🎨 Amelioration du style des exemples
parent
a86bcd8829
commit
d743153afa
|
@ -18,16 +18,12 @@
|
|||
list-style-type: none;
|
||||
}
|
||||
#examples .example {
|
||||
font-weight: 500;
|
||||
margin: 0.6em;
|
||||
cursor: pointer;
|
||||
}
|
||||
#examples .example.selected .name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#examples .name {
|
||||
border: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
padding: 0.2em 0.6em;
|
||||
border-radius: 0.2em;
|
||||
font-size: 100%;
|
||||
|
|
|
@ -69,20 +69,35 @@ let Example = ({
|
|||
rule,
|
||||
currentExample,
|
||||
setExample,
|
||||
themeColours: { colour, textColour }
|
||||
}) => (
|
||||
<li
|
||||
key={nom}
|
||||
className={classNames('example', {
|
||||
selected: currentExample && currentExample.name == nom
|
||||
})}
|
||||
onClick={() =>
|
||||
currentExample && currentExample.name == nom
|
||||
? setExample(null)
|
||||
: setExample(nom, situation, rule.dottedName)
|
||||
}>
|
||||
<button className="name" style={{ color: textColour, background: colour }}>
|
||||
{capitalise0(nom)}
|
||||
</button>
|
||||
</li>
|
||||
)
|
||||
themeColours: { colour, textColourOnWhite, textColour }
|
||||
}) =>
|
||||
do {
|
||||
let selected = currentExample && currentExample.name == nom
|
||||
;<li
|
||||
key={nom}
|
||||
className={classNames('example', {
|
||||
selected
|
||||
})}
|
||||
onClick={() =>
|
||||
selected
|
||||
? setExample(null)
|
||||
: setExample(nom, situation, rule.dottedName)
|
||||
}>
|
||||
<button
|
||||
className="name"
|
||||
style={
|
||||
selected
|
||||
? {
|
||||
background: colour,
|
||||
color: textColour,
|
||||
borderColor: textColourOnWhite
|
||||
}
|
||||
: {
|
||||
borderColor: textColourOnWhite,
|
||||
color: textColourOnWhite
|
||||
}
|
||||
}>
|
||||
{capitalise0(nom)}
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue