This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
feat: Box component added #644
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afc69ef
feat: Box component added
albinAppsmith c1242ee
Merge branch 'release' of github.com:appsmithorg/design-system into b…
albinAppsmith 8fa9867
fix:removed default props
albinAppsmith e114d8a
fixes in spaces prop
albinAppsmith 60ddd0d
Merge branch 'release' of github.com:appsmithorg/design-system into b…
albinAppsmith e8e1b67
removed box story
albinAppsmith 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 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
This file contains 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 |
---|---|---|
@@ -1,20 +1,14 @@ | ||
import React from "react"; | ||
import { ComponentMeta, ComponentStory } from "@storybook/react"; | ||
import { Meta } from "@storybook/react"; | ||
|
||
import { {{capitalize name}} } from "./{{capitalize name}}"; | ||
|
||
export default { | ||
title: "Design System/{{capitalize name}}", | ||
component: {{capitalize name}}, | ||
} as ComponentMeta<typeof {{capitalize name}}>; | ||
} as Meta<typeof {{capitalize name}}>; | ||
|
||
// eslint-disable-next-line react/function-component-definition | ||
const Template: ComponentStory<typeof {{capitalize name}}> = (args) => { | ||
return <{{capitalize name}} {...args} />; | ||
}; | ||
const Story = StoryObj<typeof {{capitalize name}}>; | ||
|
||
export const {{capitalize name}}Story = Template.bind({}); | ||
{{capitalize name}}Story.storyName = "{{capitalize name}}"; | ||
{{capitalize name}}Story.args = { | ||
//add arguments here | ||
}; | ||
export const {{capitalize name}}Story: Story = {}; |
This file contains 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,3 @@ | ||
import { CLASS_NAME_PREFIX } from "__config__/constants"; | ||
|
||
export const BoxClassName = `${CLASS_NAME_PREFIX}-box`; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some doubts about using another CSS-in-JS library. This will inflate the bundle, it is also not very clear what to use in the end for styles. Do you plan to switch to this library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xstyled is more of like an addon to styled-components or emotion. It is not a standalone package. I can check the bundle size variation after this. And this will be removed in future when we get a clear picture on how to make these components using just CSS.