Socket
Book a DemoInstallSign in
Socket

@beeper/matrix-widget-toolkit-semantic-ui

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beeper/matrix-widget-toolkit-semantic-ui

A customized semantic-ui theme that matches the style of the Element Matrix client

1.0.9
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

@matrix-widget-toolkit/semantic-ui

@matrix-widget-toolkit/semantic-ui

This package provides a Semantic UI theme that fits to the default Element theme. See matrix-example-widget-semantic-ui for some examples.

Warning This package is deprecated. We are about to migrate all our packages to use Material UI in the future.

Usage

This package should be used with a CRACO project.

Install it with:

yarn add @matrix-widget-toolkit/semantic-ui semantic-ui-react
yarn add --dev @semantic-ui-react/craco-less

Register the plugin in your craco.config.js:

module.exports = {
  plugins: [
    {
      plugin: require('@matrix-widget-toolkit/semantic-ui/craco/buildSemanticUiThemePlugin'),
    },
  ],
};

Add the following to your package.json so jest finds the virtual modules that are used inside of the package:

  "jest": {
    "moduleNameMapper": {
      "semantic-ui-less/semantic.less(.+)": "semantic-ui-less/semantic.less"
    }
  }

Now you can use it in your application:

import {
  SemanticUiThemeProvider,
  SemanticUiWidgetApiProvider,
} from '@matrix-widget-toolkit/semantic-ui';
import { Button } from 'semantic-ui-react';

function App() {
  return (
    <SemanticUiThemeProvider>
      <SemanticUiWidgetApiProvider>
        <Button primary>A styled button</Button>
      </SemanticUiWidgetApiProvider>
    </SemanticUiThemeProvider>
  );
}

export default App;

Customization

You can override the primary color by setting the REACT_APP_PRIMARY_COLOR environment variable to a custom color during build.

Update Font Awesome icons

The Font Awesome version coming with Semantic UI is to old and is missing icons. Therefore this theme includes a newer set of icons. To update the icons, use the following steps:

  • Use create-fomantic-icons to download the newest stable version of fontawesome and generate the files needed by Semantic UI. Run yarn create fomantic-icons to generate the required files.
  • Modify fui-icons/ui/src/themes/default/elements/icon.variables and remove the #icons references from SVG font imports.

Keywords

matrix

FAQs

Package last updated on 01 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.