diff --git a/packages/react-bootstrap-table2-example/.storybook/preview-head.html b/packages/react-bootstrap-table2-example/.storybook/preview-head.html new file mode 100644 index 0000000..25bdb14 --- /dev/null +++ b/packages/react-bootstrap-table2-example/.storybook/preview-head.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js new file mode 100644 index 0000000..881f939 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/borderless-table.js @@ -0,0 +1,50 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/basic/index.js b/packages/react-bootstrap-table2-example/examples/basic/index.js index dea94e0..b1b762c 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/index.js +++ b/packages/react-bootstrap-table2-example/examples/basic/index.js @@ -11,11 +11,7 @@ function addProducts(quantity) { products.push({ id, name: `Item name ${id}`, - price: 2100 + i, - nest: { - address: 'Address 1', - postcal: '0922-1234' - } + price: 2100 + i }); } } @@ -24,30 +20,31 @@ addProducts(5); const columns = [{ dataField: 'id', - text: 'Product ID', - style: { - backgroundColor: 'red' - }, - headerTitle: (column, colIndex) => 'yes~~~ oh', // eslint-disable-line no-unused-vars - classes: 'my-xxx' + text: 'Product ID' }, { dataField: 'name', - text: 'Product Name', - headerTitle: true, - formatter: (cell, row) => - (

{ cell }::: ${ row.price }

) + text: 'Product Name' }, { dataField: 'price', - text: 'Product Price', - style: (cell, row, colIndex) => ({ // eslint-disable-line no-unused-vars - backgroundColor: 'blue' - }) -}, { - dataField: 'nest.address', - text: 'Address' -}, { - dataField: 'nest.postcal', - text: 'Postal' + text: 'Product Price' }]; -export default () => ; +export default () => ( +
+ +
{`const columns = [{
+  dataField: 'id',
+  text: 'Product ID'
+}, {
+  dataField: 'name',
+  text: 'Product Name'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js new file mode 100644 index 0000000..84a86fc --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/basic/striped-hover-condensed-table.js @@ -0,0 +1,54 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js new file mode 100644 index 0000000..c79c502 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-align-table.js @@ -0,0 +1,62 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + align: 'center' +}, { + dataField: 'name', + text: 'Product Name', + align: (cell, row, colIndex) => { + if (row.id % 2 === 0) return 'right'; + return 'left'; + } +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  align: 'center'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  align: (cell, row, colIndex) => {
+    if (row.id % 2 === 0) return 'right';
+    return 'left';
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js new file mode 100644 index 0000000..545616b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-class-table.js @@ -0,0 +1,62 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + classes: 'demo-key-row' +}, { + dataField: 'name', + text: 'Product Name', + classes: (cell, row, colIndex) => { + if (row.id % 2 === 0) return 'demo-row-even'; + return 'demo-row-odd'; + } +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  classes: 'demo-key-row'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  classes: (cell, row, colIndex) => {
+    if (row.id % 2 === 0) return 'demo-row-even';
+    return 'demo-row-odd';
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js new file mode 100644 index 0000000..17bb43b --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-event-table.js @@ -0,0 +1,60 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-alert: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + events: { + onClick: () => alert('Click on Product ID field') + } +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+

Try to Click on Product ID columns

+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  events: {
+    onClick: () => alert('Click on Product ID field')
+  }
+}, {
+  dataField: 'name',
+  text: 'Product Name'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js new file mode 100644 index 0000000..ecc40fe --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-table.js @@ -0,0 +1,84 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i, + onSale: Math.random() >= 0.5 + }); + } +} + +addProducts(5); + +function priceFormatter(cell, row) { + if (row.onSale) { + return ( + $ { cell } NTD(Sales!!) + ); + } + + return ( + $ { cell } NTD + ); +} + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + formatter: priceFormatter +}]; + +export default () => ( +
+ +
{`
+function priceFormatter(cell, row) {
+  if (row.onSale) {
+    return (
+      
+        $ { cell } NTD(Sales!!)
+      
+    );
+  }
+
+  return (
+    $ { cell } NTD
+  );
+}
+
+const columns = [
+// omit...
+{
+  dataField: 'price',
+  text: 'Product Price',
+  formatter: priceFormatter
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js new file mode 100644 index 0000000..1e2e1ca --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-format-with-extra-data-table.js @@ -0,0 +1,78 @@ +/* eslint no-console: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + rank: Math.random() < 0.5 ? 'down' : 'up' + }); + } +} + +addProducts(5); + +function rankFormatter(cell, row, rowIndex, formatExtraData) { + return ( + + ); +} + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'rank', + text: 'Rank', + formatter: rankFormatter, + formatExtraData: { + up: 'glyphicon glyphicon-chevron-up', + down: 'glyphicon glyphicon-chevron-down' + } +}]; + +export default () => ( +
+ +
{`
+function rankFormatter(cell, row, rowIndex, formatExtraData) {
+  return (
+    
+  );
+}
+
+const columns = [
+// omit...
+{
+  dataField: 'rank',
+  text: 'Rank',
+  formatter: rankFormatter,
+  formatExtraData: {
+    up: 'glyphicon glyphicon-chevron-up',
+    down: 'glyphicon glyphicon-chevron-down'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js new file mode 100644 index 0000000..520e005 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-style-table.js @@ -0,0 +1,80 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + style: { + fontWeight: 'bold', + fontSize: '18px' + } +}, { + dataField: 'name', + text: 'Product Name', + style: (cell, row, colIndex) => { + if (row.id % 2 === 0) { + return { + backgroundColor: '#bbe' + }; + } + return { + backgroundColor: '#fea' + }; + } +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  style: {
+    fontWeight: 'bold',
+    fontSize: '18px'
+  }
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  style: (cell, row, colIndex) => {
+    if (row.id % 2 === 0) {
+      return {
+        backgroundColor: '#bbe'
+      };
+    }
+    return {
+      backgroundColor: '#fea'
+    };
+  }
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js new file mode 100644 index 0000000..8951419 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/column-title-table.js @@ -0,0 +1,56 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + title: true +}, { + dataField: 'name', + text: 'Product Name', + title: (cell, row, colIndex) => `this is custom title for ${cell}` +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  title: true
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  title: (cell, row, colIndex) => \`this is custom title for \${cell}\`
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js new file mode 100644 index 0000000..48e3ced --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/columns/nested-data-table.js @@ -0,0 +1,66 @@ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `User Name ${id}`, + phone: 21009831 + i, + address: { + city: 'New York', + postCode: '1111-4512' + } + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'User ID' +}, { + dataField: 'name', + text: 'User Name' +}, { + dataField: 'phone', + text: 'Phone' +}, { + dataField: 'address.city', + text: 'City' +}, { + dataField: 'address.postCode', + text: 'PostCode' +}]; + +export default () => ( +
+ +
{`const columns = [{
+  dataField: 'id',
+  text: 'User ID'
+}, {
+  dataField: 'name',
+  text: 'User Name'
+}, {
+  dataField: 'phone',
+  text: 'Phone'
+}, {
+  dataField: 'address.city',
+  text: 'City'
+}, {
+  dataField: 'address.postCode',
+  text: 'PostCode'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js new file mode 100644 index 0000000..ef30e9e --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-align-table.js @@ -0,0 +1,56 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerAlign: 'center' +}, { + dataField: 'name', + text: 'Product Name', + headerAlign: (column, colIndex) => 'right' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  headerAlign: 'center'
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  headerAlign: (column, colIndex) => 'right'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js new file mode 100644 index 0000000..1ab6533 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-event-table.js @@ -0,0 +1,60 @@ +/* eslint no-unused-vars: 0 */ +/* eslint no-alert: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerEvents: { + onClick: () => alert('Click on Product ID header column') + } +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+

Try to Click on Product ID header column

+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  events: {
+    onClick: () => alert('Click on Product ID header column')
+  }
+}, {
+  dataField: 'name',
+  text: 'Product Name'
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js new file mode 100644 index 0000000..923c8c0 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-format-table.js @@ -0,0 +1,71 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i, + onSale: Math.random() >= 0.5 + }); + } +} + +addProducts(5); + +function priceFormatter(column, colIndex) { + return ( +
$$ { column.text } $$
+ ); +} + +const columns = [{ + dataField: 'id', + text: 'Product ID' +}, { + dataField: 'name', + text: 'Product Name' +}, { + dataField: 'price', + text: 'Product Price', + headerFormatter: priceFormatter +}]; + +export default () => ( +
+ +
{`
+function priceFormatter(column, colIndex) {
+  return (
+    
$$ { column.text } $$
+ ); +} + +const columns = [ +// omit... +{ + dataField: 'price', + text: 'Product Price', + headerFormatter: priceFormatter +}]; + + + `} +
+
+); diff --git a/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js new file mode 100644 index 0000000..5af4b11 --- /dev/null +++ b/packages/react-bootstrap-table2-example/examples/header-columns/column-title-table.js @@ -0,0 +1,56 @@ +/* eslint no-unused-vars: 0 */ +import React from 'react'; + +import { BootstrapTable } from 'react-bootstrap-table2'; + +const products = []; + +function addProducts(quantity) { + const startId = products.length; + for (let i = 0; i < quantity; i += 1) { + const id = startId + i; + products.push({ + id, + name: `Item name ${id}`, + price: 2100 + i + }); + } +} + +addProducts(5); + +const columns = [{ + dataField: 'id', + text: 'Product ID', + headerTitle: true +}, { + dataField: 'name', + text: 'Product Name', + headerTitle: (column, colIndex) => `this is custom title for ${column.text}` +}, { + dataField: 'price', + text: 'Product Price' +}]; + +export default () => ( +
+ +
{`
+const columns = [{
+  dataField: 'id',
+  text: 'Product ID',
+  headerTitle: true
+}, {
+  dataField: 'name',
+  text: 'Product Name',
+  headerTitle: (column, colIndex) => \`this is custom title for \${column.text}\`
+}, {
+  dataField: 'price',
+  text: 'Product Price'
+}];
+
+
+    `}
+    
+
+); diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index bba557e..a0ea9d0 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -2,15 +2,56 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; +// welcome import Welcome from 'examples/welcome'; +// basic import BasicTable from 'examples/basic'; +import BorderlessTable from 'examples/basic/borderless-table'; +import StripHoverCondensedTable from 'examples/basic/striped-hover-condensed-table'; + +// work on columns +import NestedDataTable from 'examples/columns/nested-data-table'; +import ColumnFormatTable from 'examples/columns/column-format-table'; +import ColumnFormatExtraDataTable from 'examples/columns/column-format-with-extra-data-table'; +import ColumnClassTable from 'examples/columns/column-class-table'; +import ColumnStyleTable from 'examples/columns/column-style-table'; +import ColumnAlignTable from 'examples/columns/column-align-table'; +import ColumnTitleTable from 'examples/columns/column-title-table'; +import ColumnEventTable from 'examples/columns/column-event-table'; + +// work on header columns +import HeaderColumnFormatTable from 'examples/header-columns/column-format-table'; +import HeaderColumnAlignTable from 'examples/header-columns/column-align-table'; +import HeaderColumnTitleTable from 'examples/header-columns/column-title-table'; +import HeaderColumnEventTable from 'examples/header-columns/column-event-table'; // css style import 'bootstrap/dist/css/bootstrap.min.css'; import 'stories/stylesheet/storybook.scss'; +// import { action } from '@storybook/addon-actions'; + +// action('hello'); storiesOf('Welcome', module) .add('react bootstrap table 2 ', () => ); storiesOf('Basic Table', module) - .add('default', () => ); + .add('basic table', () => ) + .add('striped, hover, condensed table', () => ) + .add('borderless table', () => ); + +storiesOf('Work on Columns', module) + .add('Display Nested Data', () => ) + .add('Column Formatter', () => ) + .add('Column Formatter with Custom Data', () => ) + .add('Column Align', () => ) + .add('Column Title', () => ) + .add('Column Event', () => ) + .add('Customize Column Class', () => ) + .add('Customize Column Style', () => ); + +storiesOf('Work on Header Columns', module) + .add('Column Formatter', () => ) + .add('Column Align', () => ) + .add('Column Title', () => ) + .add('Column Event', () => ); diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss new file mode 100644 index 0000000..d8f5273 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/columns/_index.scss @@ -0,0 +1,12 @@ +.demo-key-row { + font-weight: bold; + font-size: 18px; +} + +.demo-row-even { + background-color: #bbe +} + +.demo-row-odd { + background-color: #fea +} \ No newline at end of file diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss index 5b4fa49..4b0b109 100644 --- a/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/storybook.scss @@ -3,3 +3,4 @@ @import "base/misc"; @import "welcome/index"; +@import "columns/index"; diff --git a/packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css b/packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css new file mode 100644 index 0000000..3638ea9 --- /dev/null +++ b/packages/react-bootstrap-table2-example/stories/stylesheet/tomorrow.min.css @@ -0,0 +1,2 @@ +/*! Color themes for Google Code Prettify | MIT License | github.com/jmblog/color-themes-for-google-code-prettify */ +.prettyprint{background:#fff;font-family:Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Consolas,monospace;border:0!important}.pln{color:#4d4d4c}ol.linenums{margin-top:0;margin-bottom:0;color:#8e908c}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{padding-left:1em;background-color:#fff;list-style-type:decimal}@media screen{.str{color:#718c00}.kwd{color:#8959a8}.com{color:#8e908c}.typ{color:#4271ae}.lit{color:#f5871f}.pun{color:#4d4d4c}.opn{color:#4d4d4c}.clo{color:#4d4d4c}.tag{color:#c82829}.atn{color:#f5871f}.atv{color:#3e999f}.dec{color:#f5871f}.var{color:#c82829}.fun{color:#4271ae}} \ No newline at end of file