Skip to content

Commit

Permalink
fix(collapse): modify border style
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Nov 15, 2021
1 parent 17893df commit 9e0f2f3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/varlet-ui/src/collapse-item/collapseItem.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@collapse-content-padding: 0 16px 10px;
@collapse-item-margin-top: 16px;
@collapse-disable-color: #bdbdbd;
@collapse-border-top: thin solid rgba(0, 0, 0, 0.12);

:root {
--collapse-background: @collapse-background;
Expand All @@ -16,6 +17,7 @@
--collapse-content-padding: @collapse-content-padding;
--collapse-item-margin-top: @collapse-item-margin-top;
--collapse-disable-color: @collapse-disable-color;
--collapse-border-top: @collapse-border-top;
}

.var-collapse-item {
Expand All @@ -39,7 +41,7 @@
}

&:not(:first-child)::after {
border-top: thin solid rgba(0, 0, 0, 0.12);
border-top: var(--collapse-border-top);
content: '';
left: 0;
position: absolute;
Expand Down Expand Up @@ -90,6 +92,10 @@
&__active + &,
&__active:not(:first-child) {
margin-top: var(--collapse-item-margin-top);

&::after {
border-top: none;
}
}

&__disable {
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/date-picker/__tests__/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import dayjs from 'dayjs/esm'

const [currentYear ,currentMonth] = dayjs().format('YYYY-MM').split('-')

test('test datePicker plugin', () => {
test('test datePicker plugin', () => {
const app = createApp({}).use(DatePicker)
expect(app.component(DatePicker.name)).toBeTruthy()
})
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/themes/dark/collapse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
'--collapse-background': '#272727',
'--collapse-text-color': '#fff',
'--collapse-border-top': 'thin solid rgba(255, 255, 255, 0.12)',
}
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/themes/dark/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import pullRefresh from './pullRefresh'
import switchThemes from './switch'
import steps from './steps'
import pagination from './pagination'
import table from './talble'
import table from './table'
import { StyleVars } from '../../style-provider'

export default {
Expand Down
File renamed without changes.

0 comments on commit 9e0f2f3

Please sign in to comment.