Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint - fix content position when centered #3455

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Inbal-Tish
Copy link
Collaborator

Description

Hint - fix content position when centered

Changelog

Hint - fix content position when centered

Additional info

ticket 4487

@ethanshar
Copy link
Collaborator

@Inbal-Tish
I didn't review yet, just tried it out, this snippet still reproduce the issue

export default class PlaygroundScreen extends Component {
  state = {};
  render() {
    return (
      <View bg-grey80 flex padding-20>
        <View row center>
          <Hint visible={this.state.showHint} message={'xx'} onBackgroundPress={() => this.setState({showHint: false})}>
            <Button label="Button" onPress={() => this.setState({showHint: !this.state.showHint})}/>
          </Hint>
        </View>
      </View>
    );
  }
}

@Inbal-Tish Inbal-Tish assigned ethanshar and unassigned Inbal-Tish Dec 12, 2024
@Inbal-Tish
Copy link
Collaborator Author

@Inbal-Tish I didn't review yet, just tried it out, this snippet still reproduce the issue

export default class PlaygroundScreen extends Component {
  state = {};
  render() {
    return (
      <View bg-grey80 flex padding-20>
        <View row center>
          <Hint visible={this.state.showHint} message={'xx'} onBackgroundPress={() => this.setState({showHint: false})}>
            <Button label="Button" onPress={() => this.setState({showHint: !this.state.showHint})}/>
          </Hint>
        </View>
      </View>
    );
  }
}

Looks like it related to the target and the hint widths

@ethanshar
Copy link
Collaborator

Looks like it related to the target and the hint widths

I see now that I copied a wrong reproduce snippet 🤦

This code still doesn't work

export default class PlaygroundScreen extends Component {
  state = {};
  render() {
    return (
      <View bg-grey80 flex padding-20>
        <View row center>
          <Text>SOME TEXT</Text>
          <Hint
            visible={this.state.showHint}
            message={'XXX'}
            onBackgroundPress={() => this.setState({showHint: false})}
          >
            <Button label="Button" onPress={() => this.setState({showHint: !this.state.showHint})}/>
          </Hint>
        </View>
      </View>
    );
  }
}

@ethanshar ethanshar assigned Inbal-Tish and unassigned ethanshar Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants