All Projects → Telefonica → mistica-web

Telefonica / mistica-web

Licence: MIT License
React components library for Telefonica Design System (Mistica)

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mistica-web

latch-plugin-wordpress
Latch module for WordPress that lets end-users add an extra level of security to their accounts
Stars: ✭ 24 (+60%)
Mutual labels:  org-cdo
config-parser
A slim, fully managed C# library for reading/writing .ini, .conf, .cfg etc configuration files.
Stars: ✭ 67 (+346.67%)
Mutual labels:  managed
IPC.Bond
IPC.Bond is an extension of IPC library that provides inter-process communication using shared memory on Windows with Bond serialization.
Stars: ✭ 26 (+73.33%)
Mutual labels:  managed
terraform-aws-asg-dns-handler
Terraform module for dynamically setting hostnames following a pattern on instances in AWS Auto Scaling Groups
Stars: ✭ 60 (+300%)
Mutual labels:  managed
symreader-converter
Converts between Windows PDB and Portable PDB formats.
Stars: ✭ 50 (+233.33%)
Mutual labels:  managed
latch-plugin-unix
No description or website provided.
Stars: ✭ 20 (+33.33%)
Mutual labels:  org-cdo
SDK-SMS-Stack
SDK-SMS-Stack
Stars: ✭ 31 (+106.67%)
Mutual labels:  cdco
managed ml systems and iot
Managed Machine Learning Systems and Internet of Things Live Lesson
Stars: ✭ 35 (+133.33%)
Mutual labels:  managed
node-server-terminate
Allow terminating a server in an orderly fashion
Stars: ✭ 15 (+0%)
Mutual labels:  cdco
nginx-canary
nginx with canary release strategy
Stars: ✭ 43 (+186.67%)
Mutual labels:  cdco

Mística for Web


React components library for Telefonica Design System (Mistica)

Node.js CI

Getting started

Install

yarn add @telefonica/mistica

or

npm install @telefonica/mistica

Start using @telefonica/mistica

Before using any of our components you have to add <ThemeContextProvider> in the root of your React app. Here is a complete example of a form with two text fields and a submit button:

import ReactDOM from 'react-dom';
import React from 'react';
import {
  ThemeContextProvider,
  Form,
  Box,
  Stack,
  TextField,
  EmailField,
  ButtonLayout,
  ButtonPrimary,
  alert,
  getMovistarSkin,
} from '@telefonica/mistica';

const App = () => (
  <Form
    onSubmit={(formData) =>
      alert({
        title: 'This is your data',
        message: JSON.stringify(formData, null, 2),
      })
    }
  >
    <Box padding={16}>
      <Stack space={16}>
        <TextField name="name" label="Name" />
        <EmailField name="email" label="Email" />
        <ButtonLayout>
          <ButtonPrimary submit>Send</ButtonPrimary>
        </ButtonLayout>
      </Stack>
    </Box>
  </Form>
);

ReactDOM.render(
  <ThemeContextProvider
    theme={{skin: getMovistarSkin(), i18n: {locale: 'es-ES', phoneNumberFormattingRegionCode: 'ES'}}}
  >
    <App />
  </ThemeContextProvider>,
  document.getElementById('app')
);

The theme prop in ThemeContextProvider is mandatory, and you can use it to configure some aspects of the library. There are multiple settings but the only two mandatory fields are skin and i18n. Read the theme config doc for more info.

Components

Explore the components in Mistica storybook

Start prototyping interfaces with Mistica components in the Mistica playroom

More docs

Development

  • yarn test: run tests
  • yarn test-acceptance: run acceptance tests headless (you need to start storybook first)
  • yarn test-acceptance --ui: run acceptance tests with ui (you need to start storybook first)
  • yarn lint: check codestyle
  • yarn ts-check: check static types
  • yarn build: build package
  • yarn storybook: starts storybook
  • yarn playroom: starts playroom

More about Mistica

Mistica in other platforms

Contributing

See CONTRIBUTING.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].