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
7045bd11
Commit
7045bd11
authored
Jul 07, 2017
by
Ari Rizzitano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement CssJail
parent
8b56a117
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletions
+46
-1
.storybook/config.js
+10
-1
src/CssJail/CssJail.scss
+15
-0
src/CssJail/index.jsx
+21
-0
No files found.
.storybook/config.js
View file @
7045bd11
import
{
configure
}
from
'@storybook/react'
;
import
React
from
'react'
;
import
{
configure
,
addDecorator
}
from
'@storybook/react'
;
import
{
setOptions
}
from
'@storybook/addon-options'
;
import
CssJail
from
'../src/CssJail'
;
setOptions
({
name
:
'💎 PARAGON'
,
url
:
'https://github.com/edx/paragon'
,
...
...
@@ -9,6 +12,12 @@ setOptions({
const
req
=
require
.
context
(
'../src'
,
true
,
/
\.
stories
\.
jsx$/
);
addDecorator
(
story
=>
(
<
CssJail
>
{
story
()}
<
/CssJail
>
));
function
loadStories
()
{
require
(
'./Paragon.stories.jsx'
);
req
.
keys
().
forEach
((
filename
)
=>
req
(
filename
));
...
...
src/CssJail/CssJail.scss
0 → 100644
View file @
7045bd11
.css-jail
{
@import
"~bootstrap/scss/_reboot"
;
-ms-text-size-adjust
:
100%
;
-webkit-text-size-adjust
:
100%
;
box-sizing
:
border-box
;
line-height
:
1
.15
;
font-size
:
$font-size-base
;
font-weight
:
$font-weight-base
;
line-height
:
$line-height-base
;
margin
:
0
;
color
:
$body-color
;
background-color
:
$body-bg
;
}
src/CssJail/index.jsx
0 → 100644
View file @
7045bd11
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
styles
from
'./CssJail.scss'
;
function
CssJail
({
children
})
{
return
(
<
div
style=
{
{
fontFamily
:
'sans-serif'
}
}
className=
{
styles
[
'css-jail'
]
}
>
{
children
}
</
div
>
);
}
CssJail
.
propTypes
=
{
children
:
PropTypes
.
element
.
isRequired
,
};
export
default
CssJail
;
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