Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #10: Improved output formatting #11

Merged
merged 9 commits into from
Oct 20, 2020
Prev Previous commit
Next Next commit
Issue #10: Improved output formatting
Styled buttons text casing; Fixed width, added title to the copy button
  • Loading branch information
veronikaslc committed Oct 20, 2020
commit a05083fd9627b524dd69a2409bd5031b21c28581
21 changes: 15 additions & 6 deletions guids-generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@
padding: "0",
},
copyButton: {
width: theme.spacing(17),
},
copyButtonSuccess: {
marta- marked this conversation as resolved.
Show resolved Hide resolved
backgroundColor: theme.palette.success.main,
width: theme.spacing(17),
backgroundColor: theme.palette.success.light,
"&:hover,&:focus,&:visited,&": {
backgroundColor: theme.palette.success.dark,
backgroundColor: theme.palette.success.main,
}
},
}));
Expand All @@ -114,6 +116,12 @@
},
}))(TableCell);

const StyledButton = withStyles((theme) => ({
label: {
textTransform: "none",
},
}))(Button);

const salt = "$2a$10$biRUcRBR1wroz1r45ORKs.";

// Health card number processing utils
Expand Down Expand Up @@ -497,7 +505,7 @@
/>
</Grid>
<Grid item>
<Button onClick={() => onSubmit()} variant="contained" color="primary" disabled={!(binput?.trim().length > 0)}>Generate GUIDs</Button>
<StyledButton onClick={() => onSubmit()} variant="contained" color="primary" disabled={!(binput?.trim().length > 0)}>Generate GUIDs</StyledButton>
</Grid>
</Grid>
{ Object.keys(bhashes).length > 0 &&
Expand All @@ -516,12 +524,13 @@
onCopy={() => onCopyButtonClick()}
options={{"format" : "text/plain", "debug" : true}}
marta- marked this conversation as resolved.
Show resolved Hide resolved
>
<Button variant="contained"
<StyledButton variant="contained"
color="default"
title={copied ? "GUIDs copied to clipboard" : "Copy all GUIDs to clipboard"}
className={copied ? classes.copyButtonSuccess : classes.copyButton}
startIcon=<Icon>{copied ? "check" : "file_copy"}</Icon>>
startIcon={<Icon>{copied ? "check" : "file_copy"}</Icon>}>
{copied ? "Copied" : "Copy GUIDs"}
</Button>
</StyledButton>
</CopyToClipboard>
</Grid>
</Grid>
Expand Down