Skip to content

Commit

Permalink
update build size + css
Browse files Browse the repository at this point in the history
  • Loading branch information
mckervinc committed Jun 13, 2024
1 parent 4370d0d commit 4219bb0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# CHANGELOG

## 0.5.4

_2024-06-13_

### Features

- **BREAKING:** decouples the CSS. Now, at the top of your file, add this:
```jsx
import "react-fluid-table/dist/index.css";
```

## 0.5.3

_2024-06-13_
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ npm i react-fluid-table
## Usage

```jsx
import "react-fluid-table/dist/index.css"; // this only needs to be imported once
import { Table } from "react-fluid-table";

const data = _.range(100).map(i => ({
Expand Down
1 change: 1 addition & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { RouterProvider, createHashRouter } from "react-router-dom";
import "react-fluid-table/dist/index.css";
import Page from "./Page";
import Props from "./Props";
import { Example1, Source as Example1Code } from "./examples/01-base";
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-fluid-table",
"version": "0.5.3",
"version": "0.5.4",
"description": "A React table inspired by react-window",
"author": "Mckervin Ceme <[email protected]>",
"license": "MIT",
Expand All @@ -17,7 +17,7 @@
},
"scripts": {
"clean": "rm -rf dist",
"build": "rm -rf dist ||: && rollup -c --environment BUILD:production",
"build": "rm -rf dist ||: && rollup -c --environment BUILD:production && rm -rf dist/*.es.css",
"start": "rollup -c -w --environment BUILD:development",
"site:build": "cd example && yarn install && yarn build"
},
Expand Down
5 changes: 4 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ const config = {
],
plugins: [
postcss({
plugins: []
plugins: [],
minimize: true,
include: "**/main.css",
extract: resolve("dist/main.css")
}),
svgr(),
external(),
Expand Down
8 changes: 4 additions & 4 deletions src/main.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.rft .rft-cell,
.rft .rft-header-cell {
.rft-cell,
.rft-header-cell {
box-sizing: border-box;
display: flex;
padding: 8px;
}

.rft .rft-cell.frozen,
.rft .rft-header-cell.frozen {
.rft-cell.frozen,
.rft-header-cell.frozen {
position: sticky;
z-index: 1;
}
Expand Down

0 comments on commit 4219bb0

Please sign in to comment.