update tailwindcss & tweak styles
This commit is contained in:
@@ -113,7 +113,7 @@
|
||||
<div
|
||||
{...select.getOption(option, typeof option.label === 'string' ? option.label : undefined)}
|
||||
class={[
|
||||
'flex w-full items-center gap-3 rounded px-5 py-2 text-base font-medium transition-colors',
|
||||
'flex w-full items-center gap-3 rounded px-5 py-2 text-base font-medium transition-colors select-none',
|
||||
option.disabled
|
||||
? ['cursor-not-allowed opacity-50']
|
||||
: stateless
|
||||
|
||||
@@ -111,9 +111,9 @@
|
||||
}
|
||||
|
||||
const options = opts.options;
|
||||
if (options.length === 0) return;
|
||||
const avg = options.reduce((acc, item) => acc + getLabel(item).length, 0) / options.length;
|
||||
container.style.width = `${avg * 2.5}ch`;
|
||||
console.log(`minWidth: ${avg * 2.5}ch`);
|
||||
};
|
||||
|
||||
f(buildOpts);
|
||||
|
||||
@@ -110,7 +110,7 @@ export class ToolbarGroup {
|
||||
/**
|
||||
* Creates a new toolbar toogle item in the group.
|
||||
* @param opts
|
||||
* @returns object containing state and properties
|
||||
* @returns ToolbarToggle instance
|
||||
*/
|
||||
toggle(opts: ToolbarToggleOptions = {}) {
|
||||
const toggle = ToolbarToggle.withParent(this, opts);
|
||||
@@ -166,7 +166,7 @@ export class Toolbar {
|
||||
/**
|
||||
* Creates a new toolbar toggle item.
|
||||
* @param opts
|
||||
* @returns object containing state and properties
|
||||
* @returns ToolbarToggle instance
|
||||
*/
|
||||
toggle(opts: ToolbarToggleOptions = {}) {
|
||||
return new ToolbarToggle(opts);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@import 'tailwindcss';
|
||||
@import '$lib/styles/base.css';
|
||||
@import './base.css';
|
||||
@plugin '@tailwindcss/forms';
|
||||
@plugin '@tailwindcss/container-queries';
|
||||
@plugin 'tailwindcss-animate';
|
||||
|
||||
Reference in New Issue
Block a user