Skip to content

Commit

Permalink
fix: linear-gradient docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Chaudhary authored and Rajat Chaudhary committed May 3, 2024
1 parent 6cc6a74 commit 0a64359
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { Image } from '../../core-components/nativewind';
import { Image, Center } from '../../core-components/nativewind';
import React, { useContext } from 'react';
import { LayoutContext } from '@gluestack/design-system';

const GradientImage = () => {
const { colorMode } = useContext(LayoutContext);

return (
<Image
source={
colorMode === 'light' ? '/assets/light-lg.svg' : '/assets/dark-lg.svg'
}
alt="linear-gradient"
className="h-64 w-[400px]"
/>
<Center>
<Image
source={
colorMode === 'light' ? '/assets/light-lg.svg' : '/assets/dark-lg.svg'
}
alt="linear-gradient"
className="h-64 w-[400px]"
/>
</Center>
);
};
export default GradientImage;
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import GradientImage from '../../../extra-components/nativewind/GradientImage';

This is an illustration of **Linear Gradient** component in `App.tsx` file.

<GradientImage/>

```jsx
import "./global.css";
import React, { useState } from "react";
Expand Down Expand Up @@ -76,8 +78,6 @@ export default function App() {

<br />

<GradientImage/>

## Installation

<Tabs value="expo" type="section">
Expand Down

0 comments on commit 0a64359

Please sign in to comment.