Skip to content

Commit

Permalink
Disable begin collaboration button when info is not filled out.
Browse files Browse the repository at this point in the history
  • Loading branch information
lublagg committed Aug 27, 2024
1 parent 3c1d9d4 commit 5366bbf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
--teal-light-2: #b7e2ec;
--teal-light-3: #cdebf2;
--charcoal: #080808;
--charcoal-light: #333333;
--charcoal-light-5: #f2f2f2;
}

.App {
Expand Down Expand Up @@ -152,6 +154,13 @@ button:active {
background-color: var(--teal-light-1);
}

button:disabled {
opacity: 0.7;
background-color: var(--charcoal-light-5);
color: var(--charcoal-light);
cursor: not-allowed;
}

.cancel-button {
padding: 0px;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion src/ui-pages/create-new-table-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const CreateNewTablePage = (props: CreateNewTablePageProps) => {
onClick={() => updateState({ createNewTable: false })}>
{CANCEL}
</button>
<button onClick={initiateShare}>{BEGIN_COLLABORATION}</button>
<button disabled={!personalDataLabel || !newTableName} onClick={initiateShare}>{BEGIN_COLLABORATION}</button>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/ui-pages/join-other-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const JoinOtherTablePage = (props: JoinOtherTableProps) => {
onClick={() => updateState({ joinOtherTable: false })}>
{CANCEL}
</button>
<button onClick={joinShare}>{BEGIN_COLLABORATION}</button>
<button disabled={!joinShareId || !personalDataLabel} onClick={joinShare}>{BEGIN_COLLABORATION}</button>
</div>
</div>
)
Expand Down
5 changes: 4 additions & 1 deletion src/ui-pages/merge-table-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export const MergeTablePage = (props: MergeTablePageProps) => {
onClick={() => updateState({ mergeTable: false })}>
{CANCEL}
</button>
<button onClick={initiateShare}>{BEGIN_COLLABORATION}</button>
<button
disabled={!selectedContextOption || !personalDataLabel || !joinShareId}
onClick={initiateShare}>{BEGIN_COLLABORATION}
</button>
</div>
</div>
)
Expand Down

0 comments on commit 5366bbf

Please sign in to comment.