-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: [email protected] <[email protected]>
- Loading branch information
1 parent
3955bd7
commit b508f0c
Showing
8 changed files
with
2,960 additions
and
1,106 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
title: "Orbit Playroom", | ||
components: "./playroomComponents.ts", | ||
outputPath: "./.playroom", | ||
frameComponent: "./playroom/FrameComponent.tsx", | ||
port: 9000, | ||
openBrowser: false, | ||
widths: [320, 768, 1024, 1440], | ||
baseUrl: "/", | ||
webpackConfig: () => ({ | ||
resolve: { | ||
extensions: [".js", ".jsx", ".ts", ".tsx", ".css"], | ||
modules: [ | ||
"node_modules", | ||
path.resolve(__dirname), | ||
path.resolve(__dirname, "src"), | ||
path.resolve(__dirname, "lib"), | ||
path.resolve(__dirname, "node_modules"), | ||
path.resolve(__dirname, "../.."), | ||
], | ||
alias: { | ||
"@kiwicom/orbit-components": path.resolve(__dirname), | ||
}, | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
sideEffects: true, | ||
use: [ | ||
"style-loader", | ||
{ | ||
loader: "css-loader", | ||
options: { importLoaders: 1 }, | ||
}, | ||
{ | ||
loader: "postcss-loader", | ||
options: { implementation: require.resolve("postcss") }, | ||
}, | ||
], | ||
}, | ||
{ | ||
test: /\.(js|jsx|ts|tsx)$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: "babel-loader", | ||
options: { | ||
presets: ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}), | ||
}; |
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,13 @@ | ||
import React from "react"; | ||
|
||
import { OrbitProvider } from "../src"; | ||
import defaultTheme from "../src/defaultTheme"; | ||
|
||
// Wrap all examples in OrbitProvider for proper theming | ||
export default function FrameComponent({ children }) { | ||
return ( | ||
<OrbitProvider theme={defaultTheme} useId={React.useId}> | ||
<div style={{ padding: "20px" }}>{children}</div> | ||
</OrbitProvider> | ||
); | ||
} |
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,31 @@ | ||
export default [ | ||
{ | ||
group: "Basic Components", | ||
name: "Button Primary", | ||
code: `<Button>Click me</Button>`, | ||
}, | ||
{ | ||
group: "Basic Components", | ||
name: "Alert Info", | ||
code: `<Alert type="info">This is an informational message</Alert>`, | ||
}, | ||
{ | ||
group: "Forms", | ||
name: "Input Field", | ||
code: `<InputField label="Username" placeholder="Enter your username" />`, | ||
}, | ||
{ | ||
group: "Layout", | ||
name: "Card with Content", | ||
code: ` | ||
<Card> | ||
<CardSection> | ||
<Stack> | ||
<Heading type="title3">Card Title</Heading> | ||
<Text>This is some content inside a card.</Text> | ||
<Button>Learn More</Button> | ||
</Stack> | ||
</CardSection> | ||
</Card>`, | ||
}, | ||
]; |
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,33 @@ | ||
// Re-export components from Orbit | ||
export { | ||
Alert, | ||
AlertButton, | ||
Badge, | ||
Box, | ||
Button, | ||
ButtonLink, | ||
Card, | ||
CardSection, | ||
Checkbox, | ||
ChoiceGroup, | ||
Heading, | ||
Icon, | ||
InputField, | ||
InputGroup, | ||
InputSelect, | ||
List, | ||
ListItem, | ||
Loading, | ||
Modal, | ||
ModalHeader, | ||
ModalSection, | ||
ModalFooter, | ||
Popover, | ||
Select, | ||
Stack, | ||
Tag, | ||
Text, | ||
TextLink, | ||
Tooltip, | ||
OrbitProvider, | ||
} from "./src"; |
Oops, something went wrong.