![]() ![]() ReactFontPicker_Option:hover /* MATERIAL DESIGN: */ /* Elements that have the Material design click ripple effect */ div.ReactFontPicker_Wrapper. ReactFontPicker_OptionsHidden /* Option (font) in the dropdown option list */. ![]() ReactFontPicker_Button:hover /* Option list (list of fonts) */. ReactFontPicker_SelectedOption /* Small dropdown arrow */. ReactFontPicker_LabelFloat /* The option that is displayed in the main field */. ReactFontPicker_Label /* Label when a font is selected (floating above the selected option) */. ReactFontPicker_Wrapper:hover /* Label when no font is selected */. ReactFontPicker /* The component UI wrapper */. Here are the component CSS classnames for quick reference: /* Component wrapper */. ReactFontPicker rule is not found in the DOM. The default one is injected dynamically if the. You can supply your own stylesheet if the default material design-style doesn't fit for you. It should take one argument which is the selected font's name as string. When a font is selected and the option list is opened again, the selected font text will display this color.Ī function that's called when a font is selected. See previews of each font in the font option list when selecting fonts The list indices should be strings e.g "Arial" The component works as standalone even if you don't supply it with any properties. var React = require('react') var FontPicker = require('react-font-picker') var App = React.createClass() PropertiesĪll properties are optional. Just require the 'react-font-picker' package which exports the component. npm install react-font-picker -save Usage If you use this, make sure you have already included React, and it is available as a global variable. You can also use the standalone build by including dist/react-font-picker.js in your page. The easiest way to use react-font-picker is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc). To build the examples locally, run: npm install npm start It exports the component that works as standalone with local component state or with app state / store (like Redux). This is a ReactJS font picker component with Material Design styling as default styling. ATTENTION: Looking for maintainers! This module needs a good rewrite to work with latest React ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |