import { Button } from 'gadjet/dist/module/gadjet.bundle.js';
<script defer>
import { Button } from 'gadjet/dist/module/gadjet.bundle.js';
Button.tagStyle({
color: 'blue'
})
After import
Button
class, it will automatically apply style on standard <button> element. However, you can extendButton
and define to a custom tag name.
<button>Button</button>
import { ButtonPin } from 'gadjet/dist/module/ui/button/button-pin.js';
<script defer>
import { ButtonPin } from 'gadjet';
ButtonPin.define('el-button-pin');
ButtonPin.tagStyle({
color: 'blue'
})
<el-button-pin>+</el-button-pin>
import { Button } from 'gadjet/dist/module/ui/button/button-square.js';
<script defer>
import { ButtonSquare } from 'gadjet';
ButtonSquare.define('el-button-square');
ButtonSquare.tagStyle({
color: 'blue',
borderRadius: '4px'
});
<el-button-square>✕</el-button-square>
import { ButtonGroup } from 'gadjet/dist/module/ui/button/button-group.js';
<script defer>
import { ButtonGroup } from 'gadjet';
ButtonGroup.define('el-button-group');
ButtonGroup.tagStyle({
borderRadius: '4px'
});
<el-button-group style="width: 10rem;">
<button>OK</button>
<button>Cancel</button>
</el-button-group>