Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move @blueprintjs/select to peer dependencies and misc #856

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { RootLayoutDecorator } from '../stories/utils.js';
import '../styles/storybook-globals.css';
import '../styles/preflight.css';
import '@blueprintjs/core/lib/css/blueprint.css';
import '@blueprintjs/select/lib/css/blueprint-select.css';
import '@blueprintjs/icons/lib/css/blueprint-icons.css';

const preview: Preview = {
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ React components to build scientific applications UI.

### Global css

If you use tailwindcss and already you added `@tailwind base;` to your tailwind stylesheet, you can skip this step.
Import the preflight css stylesheet, unless you use tailwindcss and you already added `@tailwind base;` to your tailwind stylesheet:

Otherwise, import the global styles in your application:
```js
import 'react-science/styles/preflight.css';
```

Then import the blueprint stylesheets:

`import 'react-science/styles/preflight.css';`
```js
import '@blueprintjs/core/lib/css/blueprint.css';
import '@blueprintjs/select/lib/css/blueprint-select.css';
import '@blueprintjs/icons/lib/css/blueprint-icons.css';
```

## Introduction

Expand Down
37 changes: 34 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"peerDependencies": {
"@blueprintjs/core": "^5.16.0",
"@blueprintjs/icons": "^5.15.0",
"@blueprintjs/select": "^5.3.5",
"fifo-logger": "^1.0.0",
"react": ">=18.0.0",
"react-dom": ">=18.0.0"
},
"dependencies": {
"@blueprintjs/select": "^5.3.5",
"@emotion/styled": "^11.13.5",
"@tanstack/react-table": "^8.20.5",
"@tanstack/react-virtual": "^3.10.9",
Expand All @@ -70,6 +70,7 @@
"devDependencies": {
"@blueprintjs/core": "^5.16.0",
"@blueprintjs/icons": "^5.15.0",
"@blueprintjs/select": "^5.3.5",
"@floating-ui/react": "^0.26.28",
"@playwright/experimental-ct-react": "^1.49.0",
"@playwright/test": "^1.49.0",
Expand Down
1 change: 1 addition & 0 deletions src/pages/demo/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import MainLayout from './MainLayout.js';

import '@blueprintjs/core/lib/css/blueprint.css';
import '@blueprintjs/select/lib/css/blueprint-select.css';
import '@blueprintjs/icons/lib/css/blueprint-icons.css';
import { queryClient } from './query_client.js';

Expand Down
12 changes: 7 additions & 5 deletions stories/components/select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,12 @@ export function WithCustomStyle() {
);
}

const Row = styled.div({
display: 'flex',
flexDirection: 'row',
});
const Row = styled.div`
display: flex;
flex-direction: row;
align-items: center;
gap: 5px;
`;

const Tag = styled.div({
borderRadius: '25px',
Expand All @@ -417,7 +419,7 @@ export function WithCustomRenderItem() {
>
<span>{label.charAt(0)}</span>
</Tag>
<span style={{ flex: 1, padding: '0 5px' }}>{label}</span>
<span style={{ flex: 1 }}>{label}</span>
<Tag
style={{
border: `${color} 1px solid`,
Expand Down
Loading