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

分割可能でない単語がHintTextに含まれていたときにあふれないようにする #679

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions packages/react-sandbox/src/components/HintText/index.story.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Meta, StoryObj } from '@storybook/react'
import HintText from '.'

export default {
title: 'react-sandbox/HintText',
component: HintText,
parameters: {
layout: 'centered',
},
argTypes: {
children: { type: 'string' },
context: {
control: {
type: 'select',
options: ['page', 'section'],
},
},
},
} as Meta<typeof HintText>

export const Default: StoryObj<typeof HintText> = {
args: {
children: 'HintText',
context: 'section',
},
render: (props) => <HintText {...props} />,
}

export const NarrowWidth: StoryObj<typeof HintText> = {
args: {
children: 'LongLongLongLongLongLongLongLongLongText',
context: 'section',
},
render: (props) => (
<div style={{ width: 200 }}>
<HintText {...props} />
</div>
),
}
2 changes: 2 additions & 0 deletions packages/react-sandbox/src/components/HintText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ const IconWrap = styled.div`
const Text = styled.p`
${theme((o) => [o.font.text2, o.typography(14)])}
margin: 0;
min-width: 0;
overflow-wrap: break-word;
`

function styledProps(props: Props) {
Expand Down
Loading