-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[WEB-4740] feat: add propel seperator #7637
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
eb67946
chore: global css file added to tailwind config package
anmolsinghbhatia 583cb4d
chore: tailwind config updated
anmolsinghbhatia a145246
chore: cn utility function added to propel package
anmolsinghbhatia 4914fb3
chore: storybook init
anmolsinghbhatia fb385ea
fix: format error
anmolsinghbhatia 77aee58
chore: code refactor
anmolsinghbhatia 250b534
chore: code refactor
anmolsinghbhatia f89e280
fix: format error
anmolsinghbhatia 1a9946b
Merge branch 'chore-propel-storybook-setup' into feat-propel-seperator
JayashTripathy 997e380
feat: add propel seperator component
JayashTripathy 0b60555
Merge branch 'preview' of https://github.com/makeplane/plane into fea…
JayashTripathy 28fd707
:lock: chore: updated lock file
JayashTripathy 682783e
✏️ fix: typo in separator filename and some linting issues
JayashTripathy 3c3e56a
♻️ refactor: replace clsx with cn utility in Separator component for …
JayashTripathy 0a5ad37
🐛 fix: re-added twMerge
JayashTripathy e5fac3c
🧹 cleanup: remove unnecessary blank line in Separator component
JayashTripathy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import type { Meta, StoryObj } from "@storybook/react-vite"; | ||
| import { Separator } from "./separator"; | ||
|
|
||
| const meta: Meta<typeof Separator> = { | ||
| title: "Components/Separator", | ||
| component: Separator, | ||
| parameters: { | ||
| layout: "centered", | ||
| }, | ||
| tags: ["autodocs"], | ||
| }; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof Separator>; | ||
|
|
||
| export const Default: Story = { | ||
| render: () => ( | ||
| <div className="w-[300px] space-y-4"> | ||
| <div>Content Above</div> | ||
| <Separator /> | ||
| <div>Content Below</div> | ||
| </div> | ||
| ), | ||
| }; | ||
|
|
||
| export const Vertical: Story = { | ||
| render: () => ( | ||
| <div className="flex h-[100px] items-center space-x-4"> | ||
| <div>Left Content</div> | ||
| <Separator orientation="vertical" /> | ||
| <div>Right Content</div> | ||
| </div> | ||
| ), | ||
| }; | ||
|
|
||
| export const WithinContainer: Story = { | ||
| render: () => ( | ||
| <div className="w-[300px] rounded-lg border p-6 space-y-4"> | ||
| <div className="space-y-2"> | ||
| <h4 className="font-medium leading-none">Section 1</h4> | ||
| <p className="text-sm text-muted-foreground">Description for section 1</p> | ||
| </div> | ||
| <Separator /> | ||
| <div className="space-y-2"> | ||
| <h4 className="font-medium leading-none">Section 2</h4> | ||
| <p className="text-sm text-muted-foreground">Description for section 2</p> | ||
| </div> | ||
| </div> | ||
| ), | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import * as React from "react"; | ||
| import { Separator as SeparatorPrimitive } from "@base-ui-components/react/separator"; | ||
| import { cn } from "../utils"; | ||
|
|
||
| interface SeparatorProps extends React.ComponentProps<typeof SeparatorPrimitive> { | ||
| /** | ||
| * The orientation of the separator | ||
| * @default "horizontal" | ||
| */ | ||
| orientation?: "horizontal" | "vertical"; | ||
| } | ||
|
|
||
| const Separator = React.forwardRef<React.ElementRef<typeof SeparatorPrimitive>, SeparatorProps>( | ||
| ({ orientation = "horizontal", ...props }, ref) => ( | ||
| <SeparatorPrimitive | ||
| ref={ref} | ||
| orientation={orientation} | ||
| data-slot="separator" | ||
| data-orientation={orientation} | ||
| {...props} | ||
| className={cn("bg-custom-border-200", "shrink-0", orientation === "horizontal" ? "h-px w-full" : "h-full w-px")} | ||
| /> | ||
| ) | ||
| ); | ||
|
|
||
| Separator.displayName = "Separator"; | ||
|
|
||
| export { Separator }; | ||
| export type { SeparatorProps }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.