Skip to content

Commit

Permalink
fix(comp:button): for text and link mode, the min-width is auto (#1278)
Browse files Browse the repository at this point in the history
  • Loading branch information
danranVm committed Nov 15, 2022
1 parent b42a1c5 commit 36411e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
background-color: transparent;
border-color: transparent;
padding: 0;
min-width: auto;

&:focus,
&:hover {
Expand Down
17 changes: 12 additions & 5 deletions packages/site/src/components/global/GlobalTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@ const dataSource: MenuData[] = [
]
const themeKey = 'idux_theme'
const selectedKeys = ref([localStorage.getItem(themeKey) || 'default'])
const currTheme = localStorage.getItem(themeKey) || 'default'
const selectedKeys = ref([currTheme])
watch(selectedKeys, ([currTheme]) => {
localStorage.setItem(themeKey, currTheme)
const loadTheme = (theme: string) => {
if (window.changeTheme) {
window.changeTheme(currTheme)
window.changeTheme(theme)
} else {
fetch('/themes/s/' + currTheme)
fetch(`/themes/s/${theme}`)
}
}
loadTheme(currTheme)
watch(selectedKeys, ([theme]) => {
localStorage.setItem(themeKey, theme)
loadTheme(theme)
})
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/site/src/styles/themes/index.less
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// auto generated file
@import './default.less';
@import './seer.less';

0 comments on commit 36411e2

Please sign in to comment.