Skip to content

Commit

Permalink
Merge pull request #966 from oasisprotocol/kaja/change-outline-button…
Browse files Browse the repository at this point in the history
…-capitalization-in-theme

Use theme to capitalize all buttons
  • Loading branch information
lukaw3d authored Jan 5, 2024
2 parents b831300 + 3c25e45 commit 14c1281
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 23 deletions.
1 change: 1 addition & 0 deletions .changelog/966.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use theme to capitalize all buttons
8 changes: 1 addition & 7 deletions src/app/components/CopyToClipboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ export const CopyToClipboard: FC<CopyToClipboardProps> = ({ value, label }) => {
return (
<Tooltip arrow onOpen={hideTooltip} open={isCopied} placement="right" title={t('clipboard.success')}>
{label ? (
<Button
variant="outlined"
color="secondary"
sx={{ textTransform: 'capitalize' }}
onClick={handleCopyToClipboard}
aria-label={ariaLabel}
>
<Button variant="outlined" color="secondary" onClick={handleCopyToClipboard} aria-label={ariaLabel}>
{label}
</Button>
) : (
Expand Down
2 changes: 0 additions & 2 deletions src/app/components/PageLayout/NetworkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const StyledNetworkButton = styled(Button)(({ theme }) => ({
borderWidth: theme.spacing(1),
backgroundColor: COLORS.white,
color: COLORS.brandDark,
textTransform: 'capitalize',
textAlign: 'left',
overflow: 'hidden',

Expand Down Expand Up @@ -104,7 +103,6 @@ export const StyledMobileNetworkButton = styled(Button)(({ theme }) => ({
border: `solid 1px ${COLORS.brandExtraDark}`,
fontSize: '14px',
fontWeight: 500,
textTransform: 'capitalize',
color: COLORS.brandDark,
gap: theme.spacing(3),
height: '30px',
Expand Down
9 changes: 1 addition & 8 deletions src/app/components/ParaTimePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const StyledContent = styled(Box)(({ theme }) => ({
const TabletBackButton = styled(Button)({
color: COLORS.brandDark,
width: 'fit-content',
textTransform: 'capitalize',
textDecoration: 'none',
})

Expand Down Expand Up @@ -178,13 +177,7 @@ const ParaTimePickerContent: FC<ParaTimePickerContentProps> = ({ onClose, onConf
</Grid>

<ActionBar>
<Button
onClick={onClose}
color="secondary"
variant="outlined"
sx={{ textTransform: 'capitalize' }}
size="large"
>
<Button onClick={onClose} color="secondary" variant="outlined" size="large">
{t('common.cancel')}
</Button>

Expand Down
1 change: 0 additions & 1 deletion src/app/pages/ParatimeDashboardPage/TestnetFaucet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const TestnetFaucet: FC<TestnetFaucetProps> = ({ layer }) => {
rel="noopener noreferrer"
color="secondary"
variant="outlined"
sx={{ textTransform: 'capitalize', textAlign: 'center' }}
>
{t('testnetFaucet.request')}
</Button>
Expand Down
6 changes: 1 addition & 5 deletions src/styles/theme/defaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export const defaultTheme = createTheme({
lineHeight: '23px',
height: '47px',
borderRadius: 47,
textTransform: 'capitalize',
'&:disabled': {
backgroundColor: COLORS.lavenderGray,
color: COLORS.white,
Expand All @@ -227,7 +228,6 @@ export const defaultTheme = createTheme({
borderWidth: '1px',
borderStyle: 'solid',
borderColor: COLORS.grayMediumLight,
textTransform: 'capitalize',
':disabled': {
backgroundColor: COLORS.disabledPrimaryBackground,
color: COLORS.disabledPrimaryText,
Expand Down Expand Up @@ -260,12 +260,8 @@ export const defaultTheme = createTheme({
borderColor: COLORS.brandExtraDark,
},
},
containedSecondary: {
textTransform: 'capitalize',
},
textPrimary: {
color: COLORS.brandDark,
textTransform: 'capitalize',
'&&:hover, &&:focus-visible, &&:active': {
color: COLORS.brandExtraDark,
backgroundColor: 'transparent',
Expand Down

0 comments on commit 14c1281

Please sign in to comment.