Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/cruel-hounds-win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@launchpad-ui/components": patch
---

Code component inline style bug fix
2 changes: 1 addition & 1 deletion packages/components/src/styles/Code.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
width: fit-content;
background-color: var(--lp-color-bg-ui-tertiary);
padding: var(--lp-spacing-100) var(--lp-spacing-200);
display: flex;
display: inline-flex;
border: none;
outline: none;
}
Expand Down
11 changes: 11 additions & 0 deletions packages/components/stories/Code.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react-vite';

import { Code } from '../src/Code';
import { Text } from '../src/Text';

const meta: Meta<typeof Code> = {
title: 'Components/Content/Code',
Expand Down Expand Up @@ -61,3 +62,13 @@ export const Size: Story = {
</div>
),
};

export const Inline: Story = {
render: () => (
<Text>
This paragraph contains inline code like <Code>const variable = "value";</Code> which should
flow naturally within the text. The code component should behave as an inline element, not
breaking the text flow.
</Text>
),
};
Loading