8 changed files with 138 additions and 5 deletions
@ -0,0 +1,6 @@ |
|||
const picker = new EmojiButton({ |
|||
styleProperties: { |
|||
'--font': 'Courier New', |
|||
'--category-button-color': 'red' |
|||
} |
|||
}); |
@ -0,0 +1,57 @@ |
|||
import React from 'react'; |
|||
|
|||
import DocLayout from '../../components/DocLayout'; |
|||
|
|||
export default function CssVariables() { |
|||
return ( |
|||
<DocLayout> |
|||
<h1>CSS Variables</h1> |
|||
|
|||
<p> |
|||
The following CSS variables are supported via the |
|||
<code>styleProperties</code> picker option. There are other CSS |
|||
variables, but overriding them may cause unexpected results. |
|||
</p> |
|||
|
|||
<h2> |
|||
<code>--background-color</code> |
|||
</h2> |
|||
<p>The background color of the picker.</p> |
|||
|
|||
<h2> |
|||
<code>--category-button-color</code> |
|||
</h2> |
|||
<p>The color of the category buttons.</p> |
|||
|
|||
<h2> |
|||
<code>--category-button-active-color</code> |
|||
</h2> |
|||
<p>The color of the active category button.</p> |
|||
|
|||
<h2> |
|||
<code>--font</code> |
|||
</h2> |
|||
<p>The font to use for all UI elements in the picker.</p> |
|||
|
|||
<h2> |
|||
<code>--font-size</code> |
|||
</h2> |
|||
<p>The base font size to use for all UI elements in the picker.</p> |
|||
|
|||
<h2> |
|||
<code>--hover-color</code> |
|||
</h2> |
|||
<p>The background color when hovering over an emoji.</p> |
|||
|
|||
<h2> |
|||
<code>--secondary-text-color</code> |
|||
</h2> |
|||
<p>The secondary text color.</p> |
|||
|
|||
<h2> |
|||
<code>--text-color</code> |
|||
</h2> |
|||
<p>The primary text color.</p> |
|||
</DocLayout> |
|||
); |
|||
} |
@ -0,0 +1,40 @@ |
|||
import React from 'react'; |
|||
|
|||
import { Link } from 'gatsby'; |
|||
|
|||
import DocLayout from '../../components/DocLayout'; |
|||
import Example from '../../components/Example'; |
|||
import SourceFile from '../../components/SourceFile'; |
|||
|
|||
import customExample from '!!raw-loader!../../examples/styleCustomization.js'; |
|||
|
|||
export default function StyleCustomizationExample() { |
|||
return ( |
|||
<DocLayout> |
|||
<h1>Style Customization</h1> |
|||
<p> |
|||
Emoji Button uses CSS variables for its styling. You can override any of |
|||
these variables by including them in the <code>styleProperties</code>{' '} |
|||
option. This option is a set of keys and values mapping CSS variable |
|||
names to their values. |
|||
</p> |
|||
|
|||
<p> |
|||
See <Link to="/docs/cssVariables">CSS Variables</Link> for a list of |
|||
variables that can be overridden. |
|||
</p> |
|||
|
|||
<div> |
|||
<Example |
|||
options={{ |
|||
styleProperties: { |
|||
'--font': 'Courier New', |
|||
'--category-button-color': 'red' |
|||
} |
|||
}} |
|||
/> |
|||
<SourceFile src={customExample} /> |
|||
</div> |
|||
</DocLayout> |
|||
); |
|||
} |
Loading…
Reference in new issue