# Theme

The main thing you need to change is to start using the style rules from the props.style property, instead of using the static variable defined alongside the component. This allows us to merge the default style with any theme style that may be active in the app, and provide the final style to components.

## Example

```javascript
import React, { Component } from 'react';
import { Text, StyleProvider } from 'monalisa-ui';

const Login = () => (
  <Text>Hello MonalisaUI</Text>
);

class App extends Component {
  render() {
    const configApp = {
      color: '#ff0000',
      style: {
        fontFamily: 'Roboto',
        fontWeight: '400',
      }
    };

    return (
      <StyleProvider style={configApp}>
        <Login />
      </StyleProvider>
    );
  }
};
export default App;
```

## Dark theme and Light theme

Options:

* dark
* light

```javascript
import React, { Component } from 'react';
import { Text, StyleProvider } from 'monalisa-ui';

const Login = () => (
  <Text>Hello MonalisaUI</Text>
);

class App extends Component {
  render() {
    return (
      <StyleProvider theme="dark">
        <Login />
      </StyleProvider>
    );
  }
};
export default App;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tuantvk.gitbook.io/monalisaui/theme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
