From 81e0080aa681100a1c4e9cd10ad7c34d88caa8e3 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Mon, 29 Jan 2018 22:57:08 +0800 Subject: [PATCH] add styles for filter modules --- gulpfile.babel.js | 1 + .../.storybook/webpack.config.js | 3 ++- .../stories/index.js | 1 + .../style/react-bootstrap-table2-filter.scss | 14 ++++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 packages/react-bootstrap-table2-filter/style/react-bootstrap-table2-filter.scss diff --git a/gulpfile.babel.js b/gulpfile.babel.js index f124ae9..77b5c9f 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -24,6 +24,7 @@ const JS_SKIPS = `+(${TEST}|${LIB}|${DIST}|${NODE_MODULES})`; const STYLE_PKGS = [ 'react-bootstrap-table2', + 'react-bootstrap-table2-filter', 'react-bootstrap-table2-paginator' ].reduce((pkg, curr) => `${curr}|${pkg}`, ''); diff --git a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js index 166aef5..a2c12e2 100644 --- a/packages/react-bootstrap-table2-example/.storybook/webpack.config.js +++ b/packages/react-bootstrap-table2-example/.storybook/webpack.config.js @@ -7,6 +7,7 @@ const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filt const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor/index.js'); const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style'); const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style'); +const filterStylePath = path.join(__dirname, '../../react-bootstrap-table2-filter/style'); const storyPath = path.join(__dirname, '../stories'); const examplesPath = path.join(__dirname, '../examples'); const srcPath = path.join(__dirname, '../src'); @@ -40,7 +41,7 @@ const loaders = [{ }, { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], - include: [storyPath, sourceStylePath, paginationStylePath], + include: [storyPath, sourceStylePath, paginationStylePath, filterStylePath], }, { test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000', diff --git a/packages/react-bootstrap-table2-example/stories/index.js b/packages/react-bootstrap-table2-example/stories/index.js index 8cf4a01..f5e3db7 100644 --- a/packages/react-bootstrap-table2-example/stories/index.js +++ b/packages/react-bootstrap-table2-example/stories/index.js @@ -102,6 +102,7 @@ import 'stories/stylesheet/tomorrow.min.css'; import 'stories/stylesheet/storybook.scss'; import '../../react-bootstrap-table2/style/react-bootstrap-table2.scss'; import '../../react-bootstrap-table2-paginator/style/react-bootstrap-table2-paginator.scss'; +import '../../react-bootstrap-table2-filter/style/react-bootstrap-table2-filter.scss'; // import { action } from '@storybook/addon-actions'; diff --git a/packages/react-bootstrap-table2-filter/style/react-bootstrap-table2-filter.scss b/packages/react-bootstrap-table2-filter/style/react-bootstrap-table2-filter.scss new file mode 100644 index 0000000..16aa6dd --- /dev/null +++ b/packages/react-bootstrap-table2-filter/style/react-bootstrap-table2-filter.scss @@ -0,0 +1,14 @@ +.react-bootstrap-table > table > thead > tr > th .filter { + font-weight: normal; +} + +.react-bootstrap-table > table > thead > tr > th .select-filter option[value=''], +.react-bootstrap-table > table > thead > tr > th .select-filter.placeholder-selected { + color: lightgrey; + font-style: italic; +} + +.react-bootstrap-table > table > thead > tr > th .select-filter.placeholder-selected option:not([value='']) { + color: initial; + font-style: initial; +} \ No newline at end of file