Skip to content

How to make the toast height dynamic based on content #474

Open
@bj97301

Description

@bj97301

Is your feature request related to a problem? Please describe.
I would like my toast height to be dynamic based on the content:
Screenshot 2023-05-24 at 11 09 45 AM

because old people scale their text way up:
Screenshot 2023-05-24 at 11 09 56 AM

Describe the solution you'd like
I was able to do this by not limiting the size in base toast:

import { StyleSheet } from 'react-native';
export const HEIGHT = 60;
export const WIDTH = 340;
export const BORDER_RADIUS = 6;
export const styles = StyleSheet.create({
    base: {
        flexDirection: 'row',
        // height: HEIGHT,
        // width: WIDTH,
        borderRadius: BORDER_RADIUS,
        shadowOffset: { width: 0, height: 0 },
        shadowOpacity: 0.1,
        shadowRadius: BORDER_RADIUS,
        elevation: 2,
        backgroundColor: '#FFF'
    },
    leadingBorder: {
        borderLeftWidth: 5,
        borderLeftColor: '#D8D8D8'
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions