Skip to content

Commit

Permalink
Merge pull request #126 from 8845musign/fix-button-card-text-align
Browse files Browse the repository at this point in the history
Text is not centered when wrap on ButtonCard
  • Loading branch information
takanorip committed Jul 26, 2024
2 parents 9cb4c73 + 83b3481 commit 65f25fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/ButtonCard/ButtonCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/* TODO: Replaced by tokens when @ubie/design-tokens is up-to-date. */
line-height: 1.5;
color: var(--color-text-main);
text-align: left;
text-decoration: none;
overflow-wrap: anywhere;
cursor: pointer;
Expand Down
13 changes: 13 additions & 0 deletions src/components/ButtonCard/ButtonCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { action } from '@storybook/addon-actions';
import { Meta, StoryObj } from '@storybook/react';
import { ButtonCard } from './ButtonCard';
import { Box } from '../Box/Box';
import { Flex } from '../Flex/Flex';

export default {
Expand All @@ -21,6 +22,18 @@ export const Default: Story = {
args: defaultArgs,
};

export const WrapText: Story = {
render: (args) => (
<Box width="200px">
<ButtonCard {...args} />
</Box>
),
args: {
...defaultArgs,
children: '自分自分自分自分自分自分自分自分自分自分自分自分自分自分自分自分',
},
};

export const Disabled: Story = {
render: (args) => <ButtonCard {...args} />,
args: {
Expand Down

0 comments on commit 65f25fa

Please sign in to comment.