-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(Storybook): update storybook to use carbon styles (#7866)
* docs(Storybook): update storybook to use carbon styles * chore(yarn): dedupe * chore(storybook): add welcome page * docs(storybook): regroup components * chore(image): compress image size
- Loading branch information
Showing
85 changed files
with
342 additions
and
106 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.82 KB
.yarn/cache/@storybook-client-logger-npm-6.1.18-3244b76cb4-acf8cf6b58.zip
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.45 MB
...ished-npm-3.4.2-ef13ba5bfe-a8c3f0961e.zip → ...ished-npm-3.7.1-41b09aa23f-2483fc6957.zip
Binary file not shown.
Binary file not shown.
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,24 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import React from 'react'; | ||
import bg from './carbon_bg.png'; | ||
import './welcome.scss'; | ||
import PackageInfo from './../../package.json'; | ||
|
||
export const Welcome = () => { | ||
return ( | ||
<div | ||
className="welcome__container" | ||
style={{ | ||
background: `url(${bg}) no-repeat center center fixed`, | ||
backgroundSize: 'cover', | ||
}}> | ||
<h2 className="welcome__heading">Carbon Components</h2> | ||
<h4 className="welcome__heading welcome__heading--subtitle">{`React v${PackageInfo.version}`}</h4> | ||
</div> | ||
); | ||
}; |
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,18 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/* eslint-disable no-console */ | ||
|
||
import React from 'react'; | ||
import { Welcome as Intro } from './Welcome'; | ||
|
||
export default { | ||
title: ' Getting Started/ Welcome', | ||
component: Intro, | ||
}; | ||
|
||
export const Welcome = () => <Intro />; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
@import '~carbon-components/scss/globals/scss/typography'; | ||
|
||
.container-welcome { | ||
/* stylelint-disable-next-line declaration-no-important */ | ||
padding: 0 !important; | ||
} | ||
|
||
.welcome__container { | ||
width: 100vw; | ||
height: 100vh; | ||
padding: 3rem; | ||
} | ||
|
||
.welcome__heading { | ||
@include type-style('productive-heading-07'); | ||
|
||
color: $inverse-01; | ||
} | ||
|
||
.welcome__heading--subtitle { | ||
font-weight: 600; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 +1,55 @@ | ||
<meta name="keywords" content="IBM, design, system, Carbon, design system, Bluemix, styleguide, style, guide, components, library, pattern, kit, component, cloud, React, React.js"> | ||
<meta name="description" content="This is the React implementation of the Carbon Design System. Carbon is a series of individual styles and components, that when combined make beautiful, intuitive designs."> | ||
<meta | ||
name="keywords" | ||
content="IBM, design, system, Carbon, design system, Bluemix, styleguide, style, guide, components, library, pattern, kit, component, cloud, React, React.js" | ||
/> | ||
<meta | ||
name="description" | ||
content="This is the React implementation of the Carbon Design System. Carbon is a series of individual styles and components, that when combined make beautiful, intuitive designs." | ||
/> | ||
|
||
<!-- Open Graph --> | ||
<meta property="og:title" content="Carbon Components React"> | ||
<meta property="og:site_name" content="Carbon Components React"> | ||
<meta property="og:description" content="This is the React implementation of the Carbon Design System. Carbon is a series of individual styles and components, that when combined make beautiful, intuitive designs."> | ||
<meta property="og:image" content="https://media.github.ibm.com/user/525/files/59e3bfde-b990-11e7-87ef-072e89a87719"> | ||
<meta property="og:url" content="http://react.carbondesignsystem.com"> | ||
<meta property="og:title" content="Carbon Components React" /> | ||
<meta property="og:site_name" content="Carbon Components React" /> | ||
<meta | ||
property="og:description" | ||
content="This is the React implementation of the Carbon Design System. Carbon is a series of individual styles and components, that when combined make beautiful, intuitive designs." | ||
/> | ||
<meta | ||
property="og:image" | ||
content="https://media.github.ibm.com/user/525/files/59e3bfde-b990-11e7-87ef-072e89a87719" | ||
/> | ||
<meta property="og:url" content="http://react.carbondesignsystem.com" /> | ||
|
||
<!-- Favicon --> | ||
<link rel="icon" type="image/svg+xml" href="favicon.svg" sizes="any" /> | ||
|
||
<!-- Social --> | ||
<meta name="twitter:card" content="summary_large_image"> | ||
<meta name="twitter:image:alt" content="Carbon Design System"> | ||
<meta name="twitter:site" content="@_carbondesign"> | ||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:image:alt" content="Carbon Design System" /> | ||
<meta name="twitter:site" content="@_carbondesign" /> | ||
|
||
<!-- Storybook override --> | ||
<script> | ||
document.title = 'Carbon Components React'; | ||
setTimeout(function () { | ||
document.title = 'Carbon Components React'; | ||
}, 1000); | ||
</script> | ||
|
||
<!-- Style overrides --> | ||
<style> | ||
body a[href='/?path=/settings/about'] { | ||
display: none; | ||
} | ||
|
||
.simplebar-content form span { | ||
font-weight: 600; | ||
} | ||
|
||
.simplebar-content a button { | ||
color: #161616; | ||
} | ||
|
||
.simplebar-content .sidebar-item.selected { | ||
color: #161616; | ||
} | ||
</style> |
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,22 @@ | ||
<!-- <link | ||
href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,600&display=swap" | ||
rel="stylesheet" | ||
/> --> | ||
<style> | ||
.sbdocs-li { | ||
list-style: circle; | ||
} | ||
|
||
.sbdocs-wrapper .sbdocs-a { | ||
color: #0f62fe; | ||
} | ||
|
||
.sbdocs-wrapper .sbdocs-a:hover { | ||
color: #0353e9; | ||
} | ||
|
||
.sbdocs-wrapper .sbdocs-h2 { | ||
margin-bottom: 0; | ||
padding-bottom: 12px; | ||
} | ||
</style> |
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 |
---|---|---|
|
@@ -104,7 +104,3 @@ $prefix: 'bx'; | |
} | ||
} | ||
} | ||
|
||
.sbdocs-li { | ||
list-style: circle; | ||
} |
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,51 @@ | ||
import { create } from '@storybook/theming'; | ||
import { g10 } from '@carbon/themes'; | ||
import PackageInfo from './../package.json'; | ||
|
||
const { | ||
field01, | ||
interactive01, | ||
selectedUI, | ||
text01, | ||
inverse01, | ||
ui01, | ||
ui03, | ||
ui04, | ||
uiBackground, | ||
} = g10; | ||
|
||
export default create({ | ||
base: 'light', | ||
|
||
colorPrimary: interactive01, | ||
colorSecondary: selectedUI, | ||
|
||
// UI | ||
appBg: uiBackground, | ||
appContentBg: ui01, | ||
appBorderColor: ui03, | ||
appBorderRadius: 0, | ||
|
||
// Typography | ||
fontBase: '"IBM Plex Sans", sans-serif', | ||
fontCode: '"IBM Plex Mono", monospace', | ||
|
||
// Text colors | ||
textColor: text01, | ||
textInverseColor: inverse01, | ||
|
||
// Toolbar default and active colors | ||
barTextColor: text01, | ||
barSelectedColor: interactive01, | ||
barBg: uiBackground, | ||
|
||
// Form colors | ||
inputBg: field01, | ||
inputBorder: ui03, | ||
inputTextColor: text01, | ||
inputBorderRadius: 0, | ||
|
||
brandTitle: `Carbon Components React v${PackageInfo.version}`, | ||
brandUrl: | ||
'https://github.com/carbon-design-system/carbon/tree/master/packages/react', | ||
}); |
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
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
Oops, something went wrong.