Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paragon
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
paragon
Commits
0dc6798a
Commit
0dc6798a
authored
Jun 19, 2017
by
Ari Rizzitano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hardcode base bootstrap styles for now (ick)
parent
a922eff0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
32 deletions
+51
-32
.storybook/webpack.config.js
+3
-0
src/InputSelect/InputSelect.stories.jsx
+1
-30
src/utils/base-styles.scss
+15
-2
stories/.eslintrc.json
+5
-0
stories/Dropdown.jsx
+27
-0
No files found.
.storybook/webpack.config.js
View file @
0dc6798a
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
module
.
exports
=
{
module
.
exports
=
{
devtool
:
"source-map"
,
module
:
{
module
:
{
rules
:
[
rules
:
[
{
{
...
@@ -14,6 +15,7 @@ module.exports = {
...
@@ -14,6 +15,7 @@ module.exports = {
options
:
{
options
:
{
modules
:
true
,
modules
:
true
,
localIdentName
:
'[name]__[local]___[hash:base64:5]'
,
localIdentName
:
'[name]__[local]___[hash:base64:5]'
,
sourceMap
:
true
,
},
},
},
},
{
{
...
@@ -23,6 +25,7 @@ module.exports = {
...
@@ -23,6 +25,7 @@ module.exports = {
includePaths
:
[
includePaths
:
[
path
.
join
(
__dirname
,
'../node_modules/bootstrap/scss'
),
path
.
join
(
__dirname
,
'../node_modules/bootstrap/scss'
),
],
],
sourceMap
:
true
,
},
},
},
},
],
],
...
...
src/InputSelect/InputSelect.stories.jsx
View file @
0dc6798a
/* eslint-disable import/no-extraneous-dependencies */
import
React
from
'react'
;
import
React
from
'react'
;
import
{
storiesOf
}
from
'@storybook/react'
;
import
{
storiesOf
}
from
'@storybook/react'
;
...
@@ -92,32 +91,4 @@ storiesOf('InputSelect', module)
...
@@ -92,32 +91,4 @@ storiesOf('InputSelect', module)
/>
/>
));
));
storiesOf
(
'Dropdown'
,
module
)
dropdownStories
();
.
add
(
'basic usage'
,
()
=>
(
<
Dropdown
title=
"Search Engines"
menuItems=
{
[
{
label
:
'Google'
,
href
:
'https://google.com'
,
},
{
label
:
'DuckDuckGo'
,
href
:
'https://duckduckgo.com'
,
},
{
label
:
'Yahoo'
,
href
:
'https://yahoo.com'
,
},
]
}
classes=
{
{
dropdown
:
'dropdown'
,
active
:
'active'
,
toggle
:
'dropdown-toggle'
,
screenreader
:
'sr-only'
,
show
:
'show'
,
menu
:
'dropdown-menu'
,
menuItem
:
'dropdown-item'
,
}
}
/>
));
src/utils/base-styles.scss
View file @
0dc6798a
.paragon-component
{
.paragon-component
{
-ms-text-size-adjust
:
100%
;
-webkit-text-size-adjust
:
100%
;
box-sizing
:
border-box
;
font-family
:
sans-serif
;
line-height
:
1
.15
;
font-family
:
$font-family-base
;
font-size
:
$font-size-base
;
font-weight
:
$font-weight-base
;
line-height
:
$line-height-base
;
margin
:
0
;
color
:
$body-color
;
background-color
:
$body-bg
;
@import
"~bootstrap/scss/_reboot"
;
@import
"~bootstrap/scss/_reboot"
;
@import
"~bootstrap/scss/_normalize"
;
@import
"~bootstrap/scss/_normalize"
;
}
}
\ No newline at end of file
stories/.eslintrc.json
0 → 100644
View file @
0dc6798a
{
"rules"
:
{
"import/no-extraneous-dependencies"
:
"off"
//
storybook
should
*not*
be
a
dependency
}
}
stories/Dropdown.jsx
0 → 100644
View file @
0dc6798a
import
React
from
'react'
;
import
{
storiesOf
}
from
'@storybook/react'
;
import
Dropdown
from
'../src/Dropdown'
;
export
default
function
dropdownStories
()
{
return
storiesOf
(
'Dropdown'
,
module
)
.
add
(
'basic usage'
,
()
=>
(
<
Dropdown
title=
"Search Engines"
menuItems=
{
[
{
label
:
'Google'
,
href
:
'https://google.com'
,
},
{
label
:
'DuckDuckGo'
,
href
:
'https://duckduckgo.com'
,
},
{
label
:
'Yahoo'
,
href
:
'https://yahoo.com'
,
},
]
}
/>
));
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment