A component that lets you set padding from any side using pixel values.
Open your project folder in the terminal app.
Run npm install @devvit/kit --save
Add the line import { PixelPadding } from '@devvit/kit';
in the beginning of the component file.
Add PixelPadding
element to any component in your app, like in example below:
<PixelPadding x="20px" y="10px">
<hstack borderColor="red"
height="200px"
width="200px"
cornerRadius="medium"
gap="small"
alignment="center middle"
>
<hstack backgroundColor="cyan" width="100px" height="60px"/>
<hstack backgroundColor="green" width="20px" height="20px"/>
</hstack>
</PixelPadding>
Pixel value for padding on all sides. This can be overridden by more specific padding properties.
Pixel value for padding on left and right sides. This can be overridden by more specific padding properties.
Pixel value for padding on top and bottom sides. This can be overridden by more specific padding properties.
Pixel value for padding on the left side.
Pixel value for padding on the right side.
Pixel value for padding on the top side.
Pixel value for padding on the bottom side.
Enables the inspector mode and highlights the padding applied in green.