mirror of
https://github.com/mathuo/dockview
synced 2025-01-22 17:35:57 +00:00
refactor: change dist/styles.css to dist/styles/dockview.css
This commit is contained in:
parent
65a8095e27
commit
c91ab8617c
@ -39,10 +39,10 @@ npm install --save dockview
|
||||
|
||||
## Setup
|
||||
|
||||
You must import or reference the stylesheet at `dockview/dist/styles.css`. For example:
|
||||
You must import or reference the stylesheet at `dockview/dist/styles/dockview.css`. For example:
|
||||
|
||||
```css
|
||||
@import '~dockview/dist/styles.css';
|
||||
@import '~dockview/dist/styles/dockview.css';
|
||||
```
|
||||
|
||||
You should also attach a dockview theme to an element containing your components. For example:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import '~dockview/dist/styles.css';
|
||||
@import '~dockview/dist/styles/dockview.css';
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
|
@ -10,7 +10,6 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IDockviewPanelProps> = {
|
||||
default: (props) => {
|
||||
|
@ -10,7 +10,6 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IDockviewPanelProps> = {
|
||||
default: (props) => {
|
||||
|
@ -10,7 +10,6 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IDockviewPanelProps> = {
|
||||
default: (props) => {
|
||||
@ -29,8 +28,6 @@ const components: PanelCollection<IDockviewPanelProps> = {
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
const Watermark = (props: IWatermarkPanelProps) => {
|
||||
const [size, setSize] = React.useState<number>(props.containerApi.size);
|
||||
const [panels, setPanels] = React.useState<number>(
|
||||
|
@ -8,7 +8,6 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Story, Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IGridviewPanelProps> = {
|
||||
default: (props) => {
|
||||
|
@ -14,19 +14,21 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Story, Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IPaneviewPanelProps> = {
|
||||
default: (props) => {
|
||||
const [constraints, setConstraints] = React.useState<
|
||||
PanelConstraintChangeEvent
|
||||
>();
|
||||
const [dimensions, setDimensions] = React.useState<
|
||||
PanelDimensionChangeEvent
|
||||
>();
|
||||
const [expansionState, setExpansionState] = React.useState<
|
||||
ExpansionEvent
|
||||
>();
|
||||
const [
|
||||
constraints,
|
||||
setConstraints,
|
||||
] = React.useState<PanelConstraintChangeEvent>();
|
||||
const [
|
||||
dimensions,
|
||||
setDimensions,
|
||||
] = React.useState<PanelDimensionChangeEvent>();
|
||||
const [
|
||||
expansionState,
|
||||
setExpansionState,
|
||||
] = React.useState<ExpansionEvent>();
|
||||
const [active, setActive] = React.useState<ActiveEvent>();
|
||||
const [focus, setFocus] = React.useState<FocusEvent>();
|
||||
|
||||
@ -143,8 +145,6 @@ export const Deserialization = (props: {
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
title: 'Paneview/Deserialization',
|
||||
component: Deserialization,
|
||||
|
@ -14,19 +14,21 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Story, Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IPaneviewPanelProps> = {
|
||||
default: (props) => {
|
||||
const [constraints, setConstraints] = React.useState<
|
||||
PanelConstraintChangeEvent
|
||||
>();
|
||||
const [dimensions, setDimensions] = React.useState<
|
||||
PanelDimensionChangeEvent
|
||||
>();
|
||||
const [expansionState, setExpansionState] = React.useState<
|
||||
ExpansionEvent
|
||||
>();
|
||||
const [
|
||||
constraints,
|
||||
setConstraints,
|
||||
] = React.useState<PanelConstraintChangeEvent>();
|
||||
const [
|
||||
dimensions,
|
||||
setDimensions,
|
||||
] = React.useState<PanelDimensionChangeEvent>();
|
||||
const [
|
||||
expansionState,
|
||||
setExpansionState,
|
||||
] = React.useState<ExpansionEvent>();
|
||||
const [active, setActive] = React.useState<ActiveEvent>();
|
||||
const [focus, setFocus] = React.useState<FocusEvent>();
|
||||
|
||||
|
@ -14,19 +14,21 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Story, Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<IPaneviewPanelProps> = {
|
||||
default: (props) => {
|
||||
const [constraints, setConstraints] = React.useState<
|
||||
PanelConstraintChangeEvent
|
||||
>();
|
||||
const [dimensions, setDimensions] = React.useState<
|
||||
PanelDimensionChangeEvent
|
||||
>();
|
||||
const [expansionState, setExpansionState] = React.useState<
|
||||
ExpansionEvent
|
||||
>();
|
||||
const [
|
||||
constraints,
|
||||
setConstraints,
|
||||
] = React.useState<PanelConstraintChangeEvent>();
|
||||
const [
|
||||
dimensions,
|
||||
setDimensions,
|
||||
] = React.useState<PanelDimensionChangeEvent>();
|
||||
const [
|
||||
expansionState,
|
||||
setExpansionState,
|
||||
] = React.useState<ExpansionEvent>();
|
||||
const [active, setActive] = React.useState<ActiveEvent>();
|
||||
const [focus, setFocus] = React.useState<FocusEvent>();
|
||||
|
||||
@ -126,7 +128,6 @@ export const Simple = (props: {
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export default {
|
||||
title: 'Paneview/Simple',
|
||||
component: Simple,
|
||||
@ -150,4 +151,3 @@ export default {
|
||||
},
|
||||
},
|
||||
} as Meta;
|
||||
|
@ -9,7 +9,6 @@ import {
|
||||
} from 'dockview';
|
||||
import * as React from 'react';
|
||||
import { Story, Meta } from '@storybook/react';
|
||||
import 'dockview/dist/styles.css';
|
||||
|
||||
const components: PanelCollection<ISplitviewPanelProps> = {
|
||||
default: (props) => {
|
||||
|
@ -39,10 +39,10 @@ npm install --save dockview
|
||||
|
||||
## Setup
|
||||
|
||||
You must import or reference the stylesheet at `dockview/dist/styles.css`. For example:
|
||||
You must import or reference the stylesheet at `dockview/dist/styles/dockview.css`. For example:
|
||||
|
||||
```css
|
||||
@import '~dockview/dist/styles.css';
|
||||
@import '~dockview/dist/styles/dockview.css';
|
||||
```
|
||||
|
||||
You should also attach a dockview theme to an element containing your components. For example:
|
||||
|
@ -4,13 +4,11 @@ const concat = require('gulp-concat');
|
||||
|
||||
const init = () => {
|
||||
gulp.task('sass', () => {
|
||||
return (
|
||||
gulp
|
||||
.src('./src/**/*.scss')
|
||||
.pipe(gulpSass().on('error', gulpSass.logError))
|
||||
.pipe(concat('styles.css'))
|
||||
.pipe(gulp.dest('./dist'))
|
||||
);
|
||||
return gulp
|
||||
.src('./src/**/*.scss')
|
||||
.pipe(gulpSass().on('error', gulpSass.logError))
|
||||
.pipe(concat('dockview.css'))
|
||||
.pipe(gulp.dest('./dist/styles/'));
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user