File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33Every component in Stardust must conform to these guidelines.
44They ensure consistency and optimal development experience for Stardust users.
55
6+ 1 . Semantic UI
7+ - [ Modules] ( #Modules )
681 . [ Classes] ( #Classes )
79 - [ Extend React.Component] (#Extend React.Component)
810 - [ Identical class and component names] (#Identical class and component names)
@@ -11,6 +13,44 @@ They ensure consistency and optimal development experience for Stardust users.
11131 . [ Props] ( #Props )
1214 - [ className] ( #className )
1315
16+ ## Semantic UI
17+
18+ ### Modules
19+
20+ Semantic UI [ Modules] ( http://semantic-ui.com/introduction/glossary.html ) are components that include a jQuery plugin.
21+ These are things that have state, like a [ Dropdown] ( http://semantic-ui.com/modules/dropdown.html ) .
22+
23+ ** Element**
24+ Stardust components exposes the jQuery element on the component as ` element ` :
25+
26+ ``` jsx
27+ let checkbox = < Checkbox / > ;
28+ checkbox .element ; // the jQuery element
29+ ```
30+
31+ ** Plugin**
32+ The jQuery plugin can be called using ` element ` :
33+
34+ ``` jsx
35+ let checkbox = < Checkbox / > ;
36+ checkbox .element .checkbox (); // the Semantic UI Checkbox plugin
37+ ```
38+ You can also trigger behaviors with the plugin:
39+
40+ ``` jsx
41+ let checkbox = < Checkbox / > ;
42+ checkbox .element .checkbox (' toggle' ); // toggles the checkbox
43+ ```
44+
45+ ** Settings**
46+ Module jQuery plugins can be configured via the ` settings ` prop:
47+
48+ ``` jsx
49+ let settings = {allowAdditions: true };
50+ let dropdown = < Dropdown settings= {settings}/ > ;
51+ ```
52+ > Settings are applied on componentDidMount.
53+
1454## Classes
1555
1656### Extend React.Component
You can’t perform that action at this time.
0 commit comments