Skip to content

Commit a3e6188

Browse files
author
pipeline
committed
Ej2 4469 radio button
1 parent 9489aea commit a3e6188

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/button/default-plnkr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"index.ts":"import { enableRipple } from '@syncfusion/ej2-base';\nenableRipple(true);\nimport { Button } from '@syncfusion/ej2-buttons';\n\n/**\n * Default button sample\n */\n\n let button: Button = new Button();\n button.appendTo('#normalbtn');\n\n button = new Button({ isPrimary: true });\n button.appendTo('#primarybtn');\n\n button = new Button({ cssClass: 'e-flat' });\n button.appendTo('#flatbtn');\n\n button = new Button({ cssClass: 'e-outline', isPrimary: true });\n button.appendTo('#outlinebtn');\n\n button = new Button({ iconCss: 'e-icons e-prev-icon', cssClass: 'e-flat' });\n button.appendTo('#previconbtn');\n\n let togglebtn: Button = new Button({ iconCss: 'e-icons e-play-icon', cssClass: 'e-flat', isToggle: true });\n togglebtn.appendTo('#togglebtn');\n\n button = new Button({ iconCss: 'e-icons e-open-icon', cssClass: 'e-flat', iconPosition: 'right' });\n button.appendTo('#openiconbtn');\n\n button = new Button({ cssClass: 'e-success' });\n button.appendTo('#successbtn');\n\n button = new Button({ cssClass: 'e-info' });\n button.appendTo('#infobtn');\n\n button = new Button({ cssClass: 'e-warning' });\n button.appendTo('#warningbtn');\n\n button = new Button({ cssClass: 'e-danger' });\n button.appendTo('#dangerbtn');\n\n button = new Button({ cssClass: 'e-small' });\n button.appendTo('#smallbtn');\n\n\n document.getElementById('togglebtn').onclick = (): void => {\n if (document.getElementById('togglebtn').classList.contains('e-active')) {\n togglebtn.content = 'Pause';\n togglebtn.iconCss = 'e-icons e-pause-icon';\n } else {\n togglebtn.content = 'Play';\n togglebtn.iconCss = 'e-icons e-play-icon';\n }\n };\n\n","index.html":"<!DOCTYPE html><html><head>\n <link href=\"http://npmci.syncfusion.com/packages/production/material.css\" rel=\"stylesheet\">\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js\"></script>\n <script src=\"systemjs.config.js\"></script>\n</head>\n<body>\n<div class=\"control-section\">\n <div class=\"button-section\">\n <div id=\"button-control\">\n <div class=\"row\">\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"primarybtn\">Primary</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"normalbtn\">Normal</button>\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"outlinebtn\">Outline</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"flatbtn\">Flat</button>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"successbtn\">Success</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"warningbtn\">Warning</button>\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"dangerbtn\">Danger</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"infobtn\">Info</button>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"previconbtn\"></button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"togglebtn\">Play</button>\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"openiconbtn\">Open</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"smallbtn\">Small</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<style>\n #button-control {\n width: 100%;\n margin-top: 10%;\n text-align: center;\n }\n \n @media only screen and (max-width: 500px) {\n #button-control {\n margin-left: -3%;\n }\n }\n \n .button-section {\n width: 80%;\n margin: auto;\n }\n \n #button-control .col-xs-12 {\n margin-bottom: 30px;\n }\n \n #button-control .e-btn-icon::before {\n position: relative;\n top: 1px;\n }\n \n .e-play-icon::before {\n content: '\\e798';\n }\n \n .e-pause-icon::before {\n content: '\\e753';\n }\n \n .e-open-icon::before {\n content: '\\e782';\n }\n\n .e-prev-icon::before {\n content: '\\e797';\n }\n</style>\n\n</body></html>","systemjs.config.js":"System.config({\n transpiler: \"typescript\",\n typescriptOptions: {\n compilerOptions: {\n target: \"umd\",\n module: \"commonjs\",\n moduleResolution: \"node\",\n emitDecoratorMetadata: true,\n experimentalDecorators: true\n }\n },\n paths: {\n \"syncfusion:\": \"http://npmci.syncfusion.com/packages/production/\"\n },\n map: {\n main: \"index.ts\",\n typescript: \"https://unpkg.com/[email protected]/lib/typescript.js\",\n 'plugin-json':'https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js',\n \"@syncfusion/ej2-base\": \"syncfusion:ej2-base/dist/ej2-base.umd.min.js\",\n \"@syncfusion/ej2-buttons\": \"syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js\",\n \"@syncfusion/ej2-calendars\": \"syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js\",\n \"@syncfusion/ej2-charts\": \"syncfusion:ej2-charts/dist/ej2-charts.umd.min.js\",\n \"@syncfusion/ej2-circulargauge\": \"syncfusion:ej2-circulargauge/dist/ej2-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-lineargauge\": \"syncfusion:ej2-lineargauge/dist/ej2-lineargauge.umd.min.js\",\n \"@syncfusion/ej2-data\": \"syncfusion:ej2-data/dist/ej2-data.umd.min.js\",\n \"@syncfusion/ej2-dropdowns\": \"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-grids\": \"syncfusion:ej2-grids/dist/ej2-grids.umd.min.js\", \n \"@syncfusion/ej2-inputs\": \"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js\", \n \"@syncfusion/ej2-lists\": \"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js\",\n \"@syncfusion/ej2-navigations\": \"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js\", \n \"@syncfusion/ej2-popups\": \"syncfusion:ej2-popups/dist/ej2-popups.umd.min.js\"\n },\n meta: { \n '*.json': { loader: 'plugin-json' }\n }\n});\nSystem.import('index.ts').catch(console.error.bind(console));"}
1+
{"index.ts":"import { enableRipple } from '@syncfusion/ej2-base';\nenableRipple(true);\nimport { Button } from '@syncfusion/ej2-buttons';\n\n/**\n * Default button sample\n */\n\n let button: Button = new Button();\n button.appendTo('#normalbtn');\n\n button = new Button({ isPrimary: true });\n button.appendTo('#primarybtn');\n\n button = new Button({ cssClass: 'e-flat' });\n button.appendTo('#flatbtn');\n\n button = new Button({ cssClass: 'e-outline', isPrimary: true });\n button.appendTo('#outlinebtn');\n\n button = new Button({ iconCss: 'e-icons e-add-icon', cssClass: 'e-small e-round', isPrimary: true });\n button.appendTo('#roundbtn');\n\n let togglebtn: Button = new Button({ iconCss: 'e-icons e-play-icon', cssClass: 'e-flat', isToggle: true });\n togglebtn.appendTo('#togglebtn');\n\n button = new Button({ iconCss: 'e-icons e-open-icon', cssClass: 'e-flat', iconPosition: 'right' });\n button.appendTo('#openiconbtn');\n\n button = new Button({ cssClass: 'e-success' });\n button.appendTo('#successbtn');\n\n button = new Button({ cssClass: 'e-info' });\n button.appendTo('#infobtn');\n\n button = new Button({ cssClass: 'e-warning' });\n button.appendTo('#warningbtn');\n\n button = new Button({ cssClass: 'e-danger' });\n button.appendTo('#dangerbtn');\n\n button = new Button({ cssClass: 'e-small' });\n button.appendTo('#smallbtn');\n\n\n document.getElementById('togglebtn').onclick = (): void => {\n if (document.getElementById('togglebtn').classList.contains('e-active')) {\n togglebtn.content = 'Pause';\n togglebtn.iconCss = 'e-icons e-pause-icon';\n } else {\n togglebtn.content = 'Play';\n togglebtn.iconCss = 'e-icons e-play-icon';\n }\n };\n\n","index.html":"<!DOCTYPE html><html><head>\n <link href=\"http://npmci.syncfusion.com/packages/production/material.css\" rel=\"stylesheet\">\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js\"></script>\n <script src=\"systemjs.config.js\"></script>\n</head>\n<body>\n<div class=\"control-section\">\n <div class=\"button-section\">\n <div id=\"button-control\">\n <div class=\"row\">\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"primarybtn\">Primary</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"normalbtn\">Normal</button>\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"outlinebtn\">Outline</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"flatbtn\">Flat</button>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"successbtn\">Success</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"warningbtn\">Warning</button>\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"dangerbtn\">Danger</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"infobtn\">Info</button>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"roundbtn\"></button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"togglebtn\">Play</button>\n </div>\n </div>\n <div class=\"col-xs-6 col-sm-6 col-lg-6 col-md-6\">\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"openiconbtn\">Open</button>\n </div>\n <div class=\"col-xs-12 col-sm-12 col-lg-6 col-md-6\">\n <button id=\"smallbtn\">Small</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<style>\n #button-control {\n width: 100%;\n margin-top: 10%;\n text-align: center;\n }\n \n @media only screen and (max-width: 500px) {\n #button-control {\n margin-left: -3%;\n }\n }\n \n .button-section {\n width: 80%;\n margin: auto;\n }\n \n #button-control .col-xs-12 {\n margin-bottom: 30px;\n }\n \n #button-control .e-btn-icon::before {\n position: relative;\n top: 1px;\n }\n \n .e-play-icon::before {\n content: '\\e798';\n }\n \n .e-pause-icon::before {\n content: '\\e753';\n }\n \n .e-open-icon::before {\n content: '\\e782';\n }\n\n .e-add-icon::before {\n content: '\\e823';\n }\n</style>\n\n</body></html>","systemjs.config.js":"System.config({\n transpiler: \"typescript\",\n typescriptOptions: {\n compilerOptions: {\n target: \"umd\",\n module: \"commonjs\",\n moduleResolution: \"node\",\n emitDecoratorMetadata: true,\n experimentalDecorators: true\n }\n },\n paths: {\n \"syncfusion:\": \"http://npmci.syncfusion.com/packages/production/\"\n },\n map: {\n main: \"index.ts\",\n typescript: \"https://unpkg.com/[email protected]/lib/typescript.js\",\n 'plugin-json':'https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js',\n \"@syncfusion/ej2-base\": \"syncfusion:ej2-base/dist/ej2-base.umd.min.js\",\n \"@syncfusion/ej2-buttons\": \"syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js\",\n \"@syncfusion/ej2-calendars\": \"syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js\",\n \"@syncfusion/ej2-charts\": \"syncfusion:ej2-charts/dist/ej2-charts.umd.min.js\",\n \"@syncfusion/ej2-circulargauge\": \"syncfusion:ej2-circulargauge/dist/ej2-circulargauge.umd.min.js\",\n \"@syncfusion/ej2-lineargauge\": \"syncfusion:ej2-lineargauge/dist/ej2-lineargauge.umd.min.js\",\n \"@syncfusion/ej2-data\": \"syncfusion:ej2-data/dist/ej2-data.umd.min.js\",\n \"@syncfusion/ej2-dropdowns\": \"syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js\",\n \"@syncfusion/ej2-grids\": \"syncfusion:ej2-grids/dist/ej2-grids.umd.min.js\", \n \"@syncfusion/ej2-inputs\": \"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js\", \n \"@syncfusion/ej2-lists\": \"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js\",\n \"@syncfusion/ej2-navigations\": \"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js\", \n \"@syncfusion/ej2-popups\": \"syncfusion:ej2-popups/dist/ej2-popups.umd.min.js\"\n },\n meta: { \n '*.json': { loader: 'plugin-json' }\n }\n});\nSystem.import('index.ts').catch(console.error.bind(console));"}

src/button/default.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div class="row">
4141
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
4242
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
43-
<button id="previconbtn"></button>
43+
<button id="roundbtn"></button>
4444
</div>
4545
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
4646
<button id="togglebtn">Play</button>
@@ -111,7 +111,7 @@
111111
content: '\e782';
112112
}
113113

114-
.e-prev-icon::before {
115-
content: '\e797';
114+
.e-add-icon::before {
115+
content: '\e823';
116116
}
117117
</style>

src/button/default.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ this.default = (): void => {
1616
button = new Button({ cssClass: 'e-outline', isPrimary: true });
1717
button.appendTo('#outlinebtn');
1818

19-
button = new Button({ iconCss: 'e-icons e-prev-icon', cssClass: 'e-flat' });
20-
button.appendTo('#previconbtn');
19+
button = new Button({ iconCss: 'e-icons e-add-icon', cssClass: 'e-small e-round', isPrimary: true });
20+
button.appendTo('#roundbtn');
2121

2222
let togglebtn: Button = new Button({ iconCss: 'e-icons e-play-icon', cssClass: 'e-flat', isToggle: true });
2323
togglebtn.appendTo('#togglebtn');

src/button/sample.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
{
1313
"url": "check-box",
1414
"name": "CheckBox",
15-
"category": "Button",
16-
"type": "new"
15+
"category": "Button"
1716
},
1817
{
1918
"url": "radio-button",

0 commit comments

Comments
 (0)