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

Add prop to customise to Text style of timestamps #942

Merged
merged 2 commits into from
Sep 6, 2018
Merged

Add prop to customise to Text style of timestamps #942

merged 2 commits into from
Sep 6, 2018

Conversation

gianpaj
Copy link
Contributor

@gianpaj gianpaj commented Aug 3, 2018

Example:

<GiftedChat
  messages={this.state.messages}
  onSend={this.onSend}
  renderCustomView={CustomView}
  keyboardShouldPersistTaps="never"
  user={{ _id: 1 }}
  renderBubble={props => {
    return (
      <Bubble
        {...props}
        timeTextStyle={{
          right: { color: 'red' }
        }}
      />
    );
  }}
  parsePatterns={this.parsePatterns}
/>

Related to #672

@gianpaj gianpaj changed the title Add prop to customise to Text style of rendering times Add prop to customise to Text style of timestamps Aug 3, 2018
@dengue8830
Copy link

why this is not merged?

@codecov
Copy link

codecov bot commented Sep 6, 2018

Codecov Report

Merging #942 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #942   +/-   ##
=======================================
  Coverage   42.97%   42.97%           
=======================================
  Files          20       20           
  Lines         498      498           
  Branches      108      108           
=======================================
  Hits          214      214           
  Misses        214      214           
  Partials       70       70
Impacted Files Coverage Δ
src/Time.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 052094d...8ffd021. Read the comment docs.

@gianpaj
Copy link
Contributor Author

gianpaj commented Sep 6, 2018

I've fixed the linting and test snapshot issues. CI checks have passed :)

@xcarpentier xcarpentier merged commit 96f8cf8 into FaridSafi:master Sep 6, 2018
@xcarpentier
Copy link
Collaborator

thanks 👍

@gianpaj gianpaj deleted the patch-1 branch September 7, 2018 14:19
@supunmadhuranga
Copy link

supunmadhuranga commented Dec 23, 2019

how to change left bubble timestamp position?

@gianpaj
Copy link
Contributor Author

gianpaj commented Dec 25, 2019

@supunmadhuranga
right with left are just keys to the prop object:

<GiftedChat
  messages={this.state.messages}
  onSend={this.onSend}
  renderCustomView={CustomView}
  keyboardShouldPersistTaps="never"
  user={{ _id: 1 }}
  renderBubble={props => {
    return (
      <Bubble
        {...props}
        timeTextStyle={{
          right: { color: 'red' },
          left: { color: 'blue' }
        }}
      />
    );
  }}
  parsePatterns={this.parsePatterns}
/>

@skizzo
Copy link

skizzo commented Mar 27, 2020

So about @supunmadhuranga 's question, how can you change the position of the time so that a bubble on the left side shows the time its right edge, and not the left edge? There's absolutely nothing in the docs about this, so thanks for any hints!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants