Skip to content

Commit

Permalink
use LargeButton
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Aug 8, 2024
1 parent 2e44cca commit 14b0f9d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions components/src/atoms/buttons/LargeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type LargeButtonTypes =
| 'alertStroke'
| 'alertAlt'
interface LargeButtonProps extends StyleProps {
onClick: () => void
onClick?: () => void
buttonType?: LargeButtonTypes
buttonText: React.ReactNode
iconName?: IconName
Expand Down Expand Up @@ -203,7 +203,7 @@ export function LargeButton(props: LargeButtonProps): JSX.Element {
<LegacyStyledText
css={css`
font-size: ${fontSizeBodyLargeSemiBold};
padding-right: ${SPACING.spacing8};
padding-right: ${iconName != null ? SPACING.spacing8 : '0'};
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
${TYPOGRAPHY.level3HeaderSemiBold}
}
Expand Down
2 changes: 1 addition & 1 deletion protocol-designer/src/localization/en/shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cancel": "Cancel",
"confirm_reorder": "Are you sure you want to reorder these steps, it may cause errors?",
"create_new_protocol": "Create new protocol",
"create_new": "Create new",
"create_a_protocol": "Create a protocol",
"confirm_import": "Are you sure you want to upload this protocol?",
"done": "Done",
"edit": "edit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Landing', () => {
screen.getByText(
'A no-code solution to create protocols that x, y and z meaning for your lab and workflow.'
)
screen.getByRole('button', { name: 'Create new' })
screen.getByRole('button', { name: 'Create a protocol' })
screen.getByText('Import existing protocol')
})
})
22 changes: 12 additions & 10 deletions protocol-designer/src/pages/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
COLORS,
DIRECTION_COLUMN,
Flex,
PRODUCT,
PrimaryButton,
LargeButton,
SPACING,
StyledText,
TYPOGRAPHY,
Expand Down Expand Up @@ -61,14 +60,17 @@ export function Landing(): JSX.Element {
>
{t('no-code-solution')}
</StyledText>
{/* TODO(ja, 8/7/24): replace this with LargeButton https://opentrons.atlassian.net/browse/AUTH-622 */}
<PrimaryButton margin={SPACING.spacing32}>
<StyledNavLink to={'/createNew'}>
<StyledText desktopStyle="bodyLargeRegular">
{t('create_new')}
</StyledText>
</StyledNavLink>
</PrimaryButton>
<LargeButton
margin={SPACING.spacing32}
buttonText={
<StyledNavLink to={'/createNew'}>
<StyledText desktopStyle="bodyLargeRegular">
{t('create_a_protocol')}
</StyledText>
</StyledNavLink>
}
/>

<StyledLabel>
<StyledText desktopStyle="bodyLargeRegular" color={COLORS.grey60}>
{t('import_existing')}
Expand Down

0 comments on commit 14b0f9d

Please sign in to comment.