Skip to content

Commit

Permalink
rename to closebutton
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm committed Oct 8, 2024
1 parent 0a88c7a commit dfae2b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Story = StoryObj<typeof meta>;

export const Basic: Story = {
render: args => (
<SectionMessage closeMessage {...args}>
<SectionMessage closeButton {...args}>
<SectionMessage.Title>Danger Zone!</SectionMessage.Title>
<SectionMessage.Content>
<Text>Hello, I am a simple message.</Text>
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/SectionMessage/SectionMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface SectionMessageProps {
* The children of the component.
*/
children?: ReactNode;
closeMessage?: boolean;
closeButton?: boolean;
}

// Component
Expand All @@ -79,7 +79,7 @@ export const SectionMessage = ({
variant = 'info',
size,
children,
closeMessage,
closeButton,
...props
}: SectionMessageProps) => {
const classNames = useClassNames({
Expand Down Expand Up @@ -112,7 +112,7 @@ export const SectionMessage = ({
>
{Icon && <Icon />}
</div>
{closeMessage && (
{closeButton && (
<button
className="h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0 [grid-area:close]"
onClick={handleClose}
Expand Down

0 comments on commit dfae2b0

Please sign in to comment.