Skip to content

Commit

Permalink
css polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
AsmaaELM committed Mar 31, 2022
1 parent 6de72f9 commit 7a5a79a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/react/ui-elements/TableKeyValue2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export const Groups = styled.div`
max-width: 450px;
`;
export const ScrollArea = styled.div`
overflow: auto;
max-height: calc(100vh - 19rem);
`;
export const Group = styled.div`
margin-bottom: ${spacing.sp24};
`;
Expand Down Expand Up @@ -149,14 +153,12 @@ export const Header = styled.div`
`;
export const BannerContainer = styled.div`
margin-right: ${spacing.sp8};
width: 50%;
width: 60%;
visibility: ${(props) => (props.isHidden ? 'hidden' : 'visible')};
`;
export const Footer = styled.div`
display: flex;
justify-content: flex-end;
margin-top: ${spacing.sp8};
margin-bottom: ${spacing.sp8};
`;
export const ExtraCell = styled.div`
Expand Down
9 changes: 8 additions & 1 deletion src/react/workflow/ConfigurationTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ function EditForm({
<T.Row>
<T.Key principal={true}> Rule Type </T.Key>
{isExpirationWorkflow(workflow) ? (
<T.Value>Expiration</T.Value>
<T.Value>
<i className="fas fa-stopwatch" />
Expiration
</T.Value>
) : (
<T.Value>
<i className="fas fa-coins" />
Expand All @@ -427,6 +430,7 @@ function EditForm({
id="cancel-workflow-btn"
style={{
marginRight: spacing.sp24,
marginBottom: spacing.sp20,
}}
variant="outline"
disabled={!formState.isDirty}
Expand All @@ -435,6 +439,9 @@ function EditForm({
/>
<Button
disabled={!formState.isDirty || !formState.isValid}
style={{
marginBottom: spacing.sp20,
}}
icon={<i className="fas fa-save" />}
id="create-workflow-btn"
variant="primary"
Expand Down
3 changes: 2 additions & 1 deletion src/react/workflow/CreateWorkflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const CreateWorkflow = () => {
return (
<FormProvider {...useFormMethods}>
<FormContainer>
<F.Form onSubmit={handleSubmit(onSubmit)}>
<F.Form onSubmit={handleSubmit(onSubmit)} style={{paddingLeft: '15%', paddingRight: '15%'}}>
<F.Title>Create New Workflow</F.Title>
<T.Group>
<T.GroupContent>
Expand Down Expand Up @@ -265,6 +265,7 @@ const CreateWorkflow = () => {
/>
<Button
disabled={loading || !formState.isValid}
icon={<i className="fas fa-plus" />}
id="create-workflow-btn"
variant="primary"
label="Create"
Expand Down
6 changes: 4 additions & 2 deletions src/react/workflow/ExpirationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const ExpirationContainer = styled.div`
flex-direction: column;
width: 100%;
${T.Row} {
height: 42px;
min-height: 42px;
height: 25px;
max-height: 25px;
}
`;

Expand Down Expand Up @@ -126,6 +126,7 @@ export function ExpirationForm({ bucketList, locations, prefix = '' }: Props) {
{...register(`${prefix}type`)}
autoComplete="off"
/>
<T.ScrollArea>
<T.Groups style={{ maxWidth: 'inherit' }}>
<T.Group>
<T.GroupName>General</T.GroupName>
Expand Down Expand Up @@ -630,6 +631,7 @@ export function ExpirationForm({ bucketList, locations, prefix = '' }: Props) {
</T.GroupContent>
</T.Group>
</T.Groups>
</T.ScrollArea>
</ExpirationContainer>
);
}
6 changes: 4 additions & 2 deletions src/react/workflow/WorkflowList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function WorkflowList({ workflows, workflowId }: Props) {
accessor: 'name',
cellStyle: {
textAlign: 'left',
minWidth: '20rem',
minWidth: '28rem',
marginLeft: '1rem',
},
Cell: renderRowSubComponent,
Expand All @@ -60,6 +60,7 @@ function WorkflowList({ workflows, workflowId }: Props) {
cellStyle: {
textAlign: 'left',
minWidth: '10rem',
marginLeft: '3rem',
},
Cell({ value: type }: { value: string }) {
return (
Expand All @@ -78,6 +79,7 @@ function WorkflowList({ workflows, workflowId }: Props) {
cellStyle: {
textAlign: 'left',
minWidth: '5rem',
marginLeft: '1rem',
},
sortType: (row1: RowType, row2: RowType) => {
return `${row1.original.state}` < `${row2.original.state}` ? 1 : -1;
Expand All @@ -90,7 +92,7 @@ function WorkflowList({ workflows, workflowId }: Props) {

return (
<div
style={{ backgroundColor: theme.brand.backgroundLevel3, height: '100%' }}
style={{ backgroundColor: theme.brand.backgroundLevel3, height: '100%', width: '50%' }}
>
<Table
columns={columns}
Expand Down

0 comments on commit 7a5a79a

Please sign in to comment.