Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
webf
react-webf
Commits
e3142bb6
Commit
e3142bb6
authored
Feb 25, 2020
by
Mickaël Bourgier
Browse files
[CssBaseline] Add "cursor" feature and its documentation
parent
b3d2c321
Pipeline
#1509
passed with stage
in 50 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
e3142bb6
...
...
@@ -12,6 +12,7 @@
### New features
-
**[CssBaseline]**
Add "cursor" feature (!7 by @chapa)
-
**[CssBaseline]**
Add "text" feature (!6 by @chapa)
## v1.2.0 (August 27, 2019) and below
...
...
src/CssBaseline/CssBaseline.js
View file @
e3142bb6
...
...
@@ -21,7 +21,7 @@ const components = Object.assign(
*/
const
CssBaseline
=
props
=>
{
const
{
features
=
[
'
color
'
,
'
reboot
'
,
'
spacing
'
,
'
text
'
,
'
typography
'
]
features
=
[
'
color
'
,
'
cursor
'
,
'
reboot
'
,
'
spacing
'
,
'
text
'
,
'
typography
'
]
}
=
props
;
return
(
...
...
@@ -46,7 +46,14 @@ CssBaseline.propTypes = {
* Liste des fonctionnalités à activer, toutes activées par défaut
*/
features
:
PropTypes
.
arrayOf
(
PropTypes
.
oneOf
([
'
color
'
,
'
reboot
'
,
'
spacing
'
,
'
text
'
,
'
typography
'
])
PropTypes
.
oneOf
([
'
color
'
,
'
cursor
'
,
'
reboot
'
,
'
spacing
'
,
'
text
'
,
'
typography
'
])
)
};
...
...
src/CssBaseline/CssBaseline.styles.cursor.js
0 → 100644
View file @
e3142bb6
export
const
cursors
=
[
'
alias
'
,
'
all-scroll
'
,
'
auto
'
,
'
cell
'
,
'
col-resize
'
,
'
context-menu
'
,
'
copy
'
,
'
crosshair
'
,
'
default
'
,
'
e-resize
'
,
'
ew-resize
'
,
'
grab
'
,
'
grabbing
'
,
'
help
'
,
'
move
'
,
'
n-resize
'
,
'
ne-resize
'
,
'
nesw-resize
'
,
'
no-drop
'
,
'
none
'
,
'
not-allowed
'
,
'
ns-resize
'
,
'
nw-resize
'
,
'
nwse-resize
'
,
'
pointer
'
,
'
progress
'
,
'
row-resize
'
,
'
s-resize
'
,
'
se-resize
'
,
'
sw-resize
'
,
'
text
'
,
'
vertical-text
'
,
'
w-resize
'
,
'
wait
'
,
'
zoom-in
'
,
'
zoom-out
'
];
export
default
()
=>
({
'
@global
'
:
Object
.
assign
(
...
cursors
.
map
(
cursor
=>
({
[
`.cursor-
${
cursor
}
`
]:
{
cursor
}
}))
)
});
src/CssBaseline/CssBaseline.styles.js
View file @
e3142bb6
export
{
default
as
color
}
from
'
./CssBaseline.styles.color
'
;
export
{
default
as
cursor
}
from
'
./CssBaseline.styles.cursor
'
;
export
{
default
as
reboot
}
from
'
./CssBaseline.styles.reboot
'
;
export
{
default
as
spacing
}
from
'
./CssBaseline.styles.spacing
'
;
export
{
default
as
text
}
from
'
./CssBaseline.styles.text
'
;
...
...
src/CssBaseline/demos/Cursor.js
0 → 100644
View file @
e3142bb6
import
React
from
'
react
'
;
import
{
cursors
}
from
'
../CssBaseline.styles.cursor
'
;
const
Cursor
=
()
=>
(
<>
<
h3
>
Fonctionnalité
<
em
>
cursor
<
/em
>
<
/h3
>
<
ul
>
{
cursors
.
map
(
cursor
=>
(
<
li
className
=
{
`cursor-
${
cursor
}
`
}
key
=
{
cursor
}
>
<
code
>
.
cursor
-
{
cursor
}
<
/code
>
<
/li
>
))}
<
/ul
>
<
/
>
);
export
default
Cursor
;
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