Skip to content

Commit

Permalink
chore: IndexSidebar class
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Aug 8, 2024
1 parent 09b9b4a commit a00b0df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion framework/core/js/src/common/utils/isDark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default function isDark(hexcolor: string | null): boolean {
let hexnumbers = hexcolor.replace('#', '');

if (hexnumbers.length === 3) {
hexnumbers = hexnumbers.split('').map(char => char.repeat(2)).join('');
hexnumbers = hexnumbers
.split('')
.map((char) => char.repeat(2))
.join('');
}

const r = parseInt(hexnumbers.slice(0, 2), 16);
Expand Down
3 changes: 2 additions & 1 deletion framework/core/js/src/forum/components/IndexSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import Button from '../../common/components/Button';
import SelectDropdown from '../../common/components/SelectDropdown';
import listItems from '../../common/helpers/listItems';
import LinkButton from '../../common/components/LinkButton';
import classList from '../../common/utils/classList';

export interface IndexSidebarAttrs extends ComponentAttrs {}

export default class IndexSidebar<CustomAttrs extends IndexSidebarAttrs = IndexSidebarAttrs> extends Component<CustomAttrs> {
view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {
return (
<nav className="IndexPage-nav sideNav">
<nav className={classList('IndexPage-nav sideNav', this.attrs.className)}>
<ul>{listItems(this.items().toArray())}</ul>
</nav>
);
Expand Down

0 comments on commit a00b0df

Please sign in to comment.